diff --git a/CHANGELOG b/CHANGELOG
index ca73b1e..95ca866 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,28 @@
 Changes for U-Boot 1.1.4:
 ======================================================================
 
+* Cleanup for GCC-4.x
+
+* Add documentation for Open Firmware Flat Tree and usage.
+  Patch by Pantelis Antoniou, 13 Oct 2005
+
+* Add missing files for Pantelis Antoniou's patch
+  Patch by Pantelis Antoniou, 04 Sep 2005
+
+* Fix problem in ppc4xx eth-driver without ethaddr (only without
+  CONFIG_NET_MULTI set)
+  Patch by Stefan Roese, 10 Oct 2005
+
+* Fix gzip bmp support (test if malloc fails, warning when truncated).
+  Increase CFG_VIDEO_LOGO_MAX_SIZE on HH405 board.
+  Patch by Stefan Roese, 07 Oct 2005
+
+* Add support for OF flat tree for the STXtc board.
+  Patch by Pantelis Antoniou, 04 Sep 2005
+
+* Support passing of OF flat trees to the kernel.
+  Patch by Pantelis Antoniou, 04 Sep 2005
+
 * Cleanup
 
 * Add support for NetSilicon NS7520 processor.
diff --git a/Makefile b/Makefile
index fa9b787..b91d5b8 100644
--- a/Makefile
+++ b/Makefile
@@ -1601,6 +1601,9 @@
 logodl_config	:	unconfig
 	@./mkconfig $(@:_config=) arm pxa logodl
 
+pxa255_idp_config:	unconfig
+	@./mkconfig $(@:_config=) arm pxa pxa255_idp
+
 wepep250_config	:	unconfig
 	@./mkconfig $(@:_config=) arm pxa wepep250
 
diff --git a/README b/README
index a45ed6d..b0e1fb2 100644
--- a/README
+++ b/README
@@ -399,6 +399,20 @@
 		expect it to be in bytes, others in MB.
 		Define CONFIG_MEMSIZE_IN_BYTES to make it in bytes.
 
+		CONFIG_OF_FLAT_TREE
+
+		New kernel versions are expecting firmware settings to be
+		passed using flat open firmware trees.
+		The environment variable "disable_of", when set, disables this
+		functionality.
+
+		CONFIG_OF_FLAT_TREE_MAX_SIZE
+
+		The maximum size of the constructed OF tree.
+
+		OF_CPU - The proper name of the cpus node.
+		OF_TBCLK - The timebase frequency.
+
 - Serial Ports:
 		CFG_PL010_SERIAL
 
diff --git a/board/LEOX/elpt860/elpt860.c b/board/LEOX/elpt860/elpt860.c
index 82a831f..775db73 100644
--- a/board/LEOX/elpt860/elpt860.c
+++ b/board/LEOX/elpt860/elpt860.c
@@ -169,7 +169,7 @@
 
 int checkboard (void)
 {
-	unsigned char *s = getenv ("serial#");
+	char *s = getenv ("serial#");
 
 	if (!s || strncmp (s, "ELPT860", 7))
 		printf ("### No HW ID - assuming ELPT860\n");
@@ -253,7 +253,7 @@
 	 * try 8 column mode
 	 */
 	size8 = dram_size (CFG_MAMR_8COL,
-			   (ulong *) SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE);
+			   SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE);
 
 	udelay (1000);
 
@@ -261,7 +261,7 @@
 	 * try 9 column mode
 	 */
 	size9 = dram_size (CFG_MAMR_9COL,
-			   (ulong *) SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE);
+			   SDRAM_BASE1_PRELIM, SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {	/* leave configuration at 9 columns       */
 		size_b0 = size9;
diff --git a/board/Marvell/common/flash.c b/board/Marvell/common/flash.c
index c2c5b76..a8add85 100644
--- a/board/Marvell/common/flash.c
+++ b/board/Marvell/common/flash.c
@@ -526,7 +526,7 @@
 
 int flash_erase (flash_info_t * info, int s_first, int s_last)
 {
-	volatile unsigned char *addr = (char *) (info->start[0]);
+	volatile unsigned char *addr = (uchar *) (info->start[0]);
 	int flag, prot, sect, l_sect;
 	ulong start, now, last;
 
@@ -696,7 +696,7 @@
 		for (sect = s_first; sect <= s_last; sect++) {
 			int sector_size = info->size / info->sector_count;
 
-			addr = (char *) (info->start[sect]);
+			addr = (uchar *) (info->start[sect]);
 			memset ((void *) addr, 0, sector_size);
 		}
 		return 0;
@@ -752,7 +752,7 @@
 	/* Start erase on unprotected sectors */
 	for (sect = s_first; sect <= s_last; sect++) {
 		if (info->protect[sect] == 0) {	/* not protected */
-			addr = (char *) (info->start[sect]);
+			addr = (uchar *) (info->start[sect]);
 			flash_cmd (info->portwidth, addr, 0, 0x30);
 			l_sect = sect;
 		}
@@ -893,7 +893,7 @@
 /* broken for 2x16: TODO */
 static int write_word (flash_info_t * info, ulong dest, ulong data)
 {
-	volatile unsigned char *addr = (char *) (info->start[0]);
+	volatile unsigned char *addr = (uchar *) (info->start[0]);
 	ulong start;
 	int flag, i;
 	ulong mask;
@@ -926,7 +926,7 @@
 					   CHIP_CMD_RST);
 				/* 1st cycle of word/byte program */
 				/* write 0x40 to the location to program */
-				flash_cmd (info->portwidth, (char *) dest, 0,
+				flash_cmd (info->portwidth, (uchar *) dest, 0,
 					   CHIP_CMD_PROG);
 				/* 2nd cycle of word/byte program */
 				/* write the data to the destination address */
diff --git a/board/Marvell/common/i2c.c b/board/Marvell/common/i2c.c
index 624ee5c..32b2b30 100644
--- a/board/Marvell/common/i2c.c
+++ b/board/Marvell/common/i2c.c
@@ -168,7 +168,7 @@
 static uchar i2c_get_data (uchar * return_data, int len)
 {
 
-	unsigned int data, status;
+	unsigned int data, status = 0;
 	int count = 0;
 
 	DP (puts ("i2c_get_data\n"));
diff --git a/board/Marvell/db64360/db64360.c b/board/Marvell/db64360/db64360.c
index 8e181d4..a2ab2d7 100644
--- a/board/Marvell/db64360/db64360.c
+++ b/board/Marvell/db64360/db64360.c
@@ -610,7 +610,7 @@
 int mem_test_data (void)
 {
 	unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START;
-	unsigned long long temp64;
+	unsigned long long temp64 = 0;
 	int num_patterns = sizeof (pattern) / sizeof (pattern[0]);
 	int i;
 	unsigned int hi, lo;
@@ -717,7 +717,7 @@
 	       unsigned long long wmask, short read, short write)
 {
 	unsigned int i;
-	unsigned long long temp;
+	unsigned long long temp = 0;
 	unsigned int hitemp, lotemp, himask, lomask;
 
 	for (i = 0; i < size; i++) {
diff --git a/board/Marvell/db64360/mv_eth.c b/board/Marvell/db64360/mv_eth.c
index e2719b9..2dd47bf 100644
--- a/board/Marvell/db64360/mv_eth.c
+++ b/board/Marvell/db64360/mv_eth.c
@@ -267,8 +267,9 @@
 		dev->send = (void *) db64360_eth_transmit;
 		dev->recv = (void *) db64360_eth_poll;
 
-		dev->priv = (void *) ethernet_private =
-			calloc (sizeof (*ethernet_private), 1);
+		ethernet_private = calloc (sizeof (*ethernet_private), 1);
+		dev->priv = (void *) ethernet_private;
+
 		if (!ethernet_private) {
 			printf ("%s: %s allocation failure, %s\n",
 				__FUNCTION__, dev->name,
@@ -281,8 +282,8 @@
 		memcpy (ethernet_private->port_mac_addr, dev->enetaddr, 6);
 
 		/* set pointer to memory for stats data structure etc... */
-		ethernet_private->port_private = (void *) port_private =
-			calloc (sizeof (*ethernet_private), 1);
+		port_private = calloc (sizeof (*ethernet_private), 1);
+		ethernet_private->port_private = (void *)port_private; 
 		if (!port_private) {
 			printf ("%s: %s allocation failure, %s\n",
 				__FUNCTION__, dev->name,
diff --git a/board/Marvell/db64460/db64460.c b/board/Marvell/db64460/db64460.c
index 75eb5e8..a4abf8d 100644
--- a/board/Marvell/db64460/db64460.c
+++ b/board/Marvell/db64460/db64460.c
@@ -610,7 +610,7 @@
 int mem_test_data (void)
 {
 	unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START;
-	unsigned long long temp64;
+	unsigned long long temp64 = 0;
 	int num_patterns = sizeof (pattern) / sizeof (pattern[0]);
 	int i;
 	unsigned int hi, lo;
@@ -717,7 +717,7 @@
 	       unsigned long long wmask, short read, short write)
 {
 	unsigned int i;
-	unsigned long long temp;
+	unsigned long long temp = 0;
 	unsigned int hitemp, lotemp, himask, lomask;
 
 	for (i = 0; i < size; i++) {
diff --git a/board/Marvell/db64460/mv_eth.c b/board/Marvell/db64460/mv_eth.c
index b78fda3..a50f174 100644
--- a/board/Marvell/db64460/mv_eth.c
+++ b/board/Marvell/db64460/mv_eth.c
@@ -267,8 +267,8 @@
 		dev->send = (void *) db64460_eth_transmit;
 		dev->recv = (void *) db64460_eth_poll;
 
-		dev->priv = (void *) ethernet_private =
-			calloc (sizeof (*ethernet_private), 1);
+		ethernet_private = calloc (sizeof (*ethernet_private), 1);
+		dev->priv = (void *)ethernet_private; 
 		if (!ethernet_private) {
 			printf ("%s: %s allocation failure, %s\n",
 				__FUNCTION__, dev->name,
@@ -281,8 +281,8 @@
 		memcpy (ethernet_private->port_mac_addr, dev->enetaddr, 6);
 
 		/* set pointer to memory for stats data structure etc... */
-		ethernet_private->port_private = (void *) port_private =
-			calloc (sizeof (*ethernet_private), 1);
+		port_private = calloc (sizeof (*ethernet_private), 1);
+		ethernet_private->port_private = (void *)port_private; 
 		if (!port_private) {
 			printf ("%s: %s allocation failure, %s\n",
 				__FUNCTION__, dev->name,
diff --git a/board/RPXClassic/RPXClassic.c b/board/RPXClassic/RPXClassic.c
index 5b12a0c..49cb8ad 100644
--- a/board/RPXClassic/RPXClassic.c
+++ b/board/RPXClassic/RPXClassic.c
@@ -114,8 +114,8 @@
 	i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
 
 	/* Read 256 bytes in EEPROM				*/
-	i2c_read (0x54, 0, 1, buff, 128);
-	i2c_read (0x54, 128, 1, buff + 128, 128);
+	i2c_read (0x54, 0, 1, (uchar *)buff, 128);
+	i2c_read (0x54, 128, 1, (uchar *)buff + 128, 128);
 
 	/* Retrieve MAC address in buffer (key EA)		*/
 	for (cp = buff;;) {
@@ -123,7 +123,7 @@
 			cp += 3;
 			/* Read MAC address			*/
 			for (i = 0; i < 6; i++, cp += 2) {
-				enet[i] = aschex_to_byte (cp);
+				enet[i] = aschex_to_byte ((unsigned char *)cp);
 			}
 		}
 		/* Scan to the end of the record		*/
@@ -200,7 +200,7 @@
 	 * try 10 column mode
 	 */
 
-	size10 = dram_size (CFG_MAMR_10COL, (ulong *) SDRAM_BASE_PRELIM,
+	size10 = dram_size (CFG_MAMR_10COL, SDRAM_BASE_PRELIM,
 						SDRAM_MAX_SIZE);
 
 	return (size10);
diff --git a/board/RPXlite/RPXlite.c b/board/RPXlite/RPXlite.c
index d2c2116..f37e07b 100644
--- a/board/RPXlite/RPXlite.c
+++ b/board/RPXlite/RPXlite.c
@@ -137,7 +137,7 @@
 	 * try 10 column mode
 	 */
 
-	size10 = dram_size (CFG_MAMR_10COL, (ulong *) SDRAM_BASE_PRELIM,
+	size10 = dram_size (CFG_MAMR_10COL, SDRAM_BASE_PRELIM,
 			    SDRAM_MAX_SIZE);
 
 	return (size10);
diff --git a/board/RPXlite_dw/RPXlite_dw.c b/board/RPXlite_dw/RPXlite_dw.c
index 86cf6c1..237c58a 100644
--- a/board/RPXlite_dw/RPXlite_dw.c
+++ b/board/RPXlite_dw/RPXlite_dw.c
@@ -142,7 +142,7 @@
 	  * try 9 column mode
 	  */
 
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *)SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE);
+	size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE_PRELIM, SDRAM_MAX_SIZE);
 
 	/*
 	 * Final mapping:
diff --git a/board/RRvision/RRvision.c b/board/RRvision/RRvision.c
index d12ea82..f46bb9e 100644
--- a/board/RRvision/RRvision.c
+++ b/board/RRvision/RRvision.c
@@ -93,7 +93,7 @@
 
 int checkboard (void)
 {
-	unsigned char *s = getenv ("serial#");
+	char *s = getenv ("serial#");
 
 	puts ("Board: RRvision ");
 
@@ -157,7 +157,7 @@
 	 * try 8 column mode
 	 */
 	size8 = dram_size (CFG_MAMR_8COL,
-			   (ulong *)SDRAM_BASE2_PRELIM,
+			   SDRAM_BASE2_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	udelay (1000);
@@ -166,7 +166,7 @@
 	 * try 9 column mode
 	 */
 	size9 = dram_size (CFG_MAMR_9COL,
-			   (ulong *) SDRAM_BASE2_PRELIM,
+			   SDRAM_BASE2_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
diff --git a/board/amcc/bubinga/bubinga.c b/board/amcc/bubinga/bubinga.c
index b4e9349..fe6ce8a 100644
--- a/board/amcc/bubinga/bubinga.c
+++ b/board/amcc/bubinga/bubinga.c
@@ -42,7 +42,7 @@
  */
 int checkboard(void)
 {
-	unsigned char *s = getenv("serial#");
+	char *s = getenv("serial#");
 
 	puts("Board: Bubinga - AMCC PPC405EP Evaluation Board");
 
diff --git a/board/amcc/ebony/ebony.c b/board/amcc/ebony/ebony.c
index f6bb837..9191f0f 100644
--- a/board/amcc/ebony/ebony.c
+++ b/board/amcc/ebony/ebony.c
@@ -91,7 +91,7 @@
 int checkboard(void)
 {
 	sys_info_t sysinfo;
-	unsigned char *s = getenv("serial#");
+	char *s = getenv("serial#");
 
 	get_sys_info(&sysinfo);
 
diff --git a/board/amcc/ocotea/ocotea.c b/board/amcc/ocotea/ocotea.c
index 50981c2..5b28c3b 100644
--- a/board/amcc/ocotea/ocotea.c
+++ b/board/amcc/ocotea/ocotea.c
@@ -187,7 +187,7 @@
 int checkboard (void)
 {
 	sys_info_t sysinfo;
-	unsigned char *s = getenv ("serial#");
+	char *s = getenv ("serial#");
 
 	get_sys_info (&sysinfo);
 
diff --git a/board/amcc/walnut/walnut.c b/board/amcc/walnut/walnut.c
index 9fca0a6..f1a96a6 100644
--- a/board/amcc/walnut/walnut.c
+++ b/board/amcc/walnut/walnut.c
@@ -67,7 +67,7 @@
  */
 int checkboard(void)
 {
-	unsigned char *s = getenv("serial#");
+	char *s = getenv("serial#");
 	uint pvr = get_pvr();
 
 	if (pvr == PVR_405GPR_RB) {
diff --git a/board/atc/flash.c b/board/atc/flash.c
index 26b7c80..2ab60e8 100644
--- a/board/atc/flash.c
+++ b/board/atc/flash.c
@@ -181,7 +181,7 @@
 	int i;
 	uchar *boottype;
 	uchar *bootletter;
-	uchar *fmt;
+	char *fmt;
 	uchar botbootletter[] = "B";
 	uchar topbootletter[] = "T";
 	uchar botboottype[] = "bottom boot sector";
diff --git a/board/barco/barco.c b/board/barco/barco.c
index 2fb3700..becbd0a 100644
--- a/board/barco/barco.c
+++ b/board/barco/barco.c
@@ -90,17 +90,17 @@
 	long mear1;
 	long emear1;
 
-	size = get_ram_size(CFG_SDRAM_BASE, CFG_MAX_RAM_SIZE);
+	size = get_ram_size (CFG_SDRAM_BASE, CFG_MAX_RAM_SIZE);
 
 	new_bank0_end = size - 1;
-	mear1 = mpc824x_mpc107_getreg(MEAR1);
-	emear1 = mpc824x_mpc107_getreg(EMEAR1);
+	mear1 = mpc824x_mpc107_getreg (MEAR1);
+	emear1 = mpc824x_mpc107_getreg (EMEAR1);
 	mear1 = (mear1  & 0xFFFFFF00) |
 		((new_bank0_end & MICR_ADDR_MASK) >> MICR_ADDR_SHIFT);
 	emear1 = (emear1 & 0xFFFFFF00) |
 		((new_bank0_end & MICR_ADDR_MASK) >> MICR_EADDR_SHIFT);
-	mpc824x_mpc107_setreg(MEAR1, mear1);
-	mpc824x_mpc107_setreg(EMEAR1, emear1);
+	mpc824x_mpc107_setreg (MEAR1, mear1);
+	mpc824x_mpc107_setreg (EMEAR1, emear1);
 
 	return (size);
 }
@@ -113,11 +113,11 @@
 	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x0f, PCI_ANY_ID,
 	  pci_cfgfunc_config_device, { PCI_ENET0_IOADDR,
 				       PCI_ENET0_MEMADDR,
-				       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
+				       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER } },
 	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 0x10, PCI_ANY_ID,
 	  pci_cfgfunc_config_device, { PCI_ENET1_IOADDR,
 				       PCI_ENET1_MEMADDR,
-				       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER }},
+				       PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER } },
 	{ }
 };
 #endif
@@ -128,68 +128,66 @@
 #endif
 };
 
-void pci_init_board(void)
+void pci_init_board (void)
 {
-	pci_mpc824x_init(&hose);
+	pci_mpc824x_init (&hose);
 }
 
-int write_flash(char *addr, char value)
+int write_flash (char *addr, char value)
 {
 	char *adr = (char *)0xFF800000;
 	int cnt = 0;
 	char status,oldstatus;
-	*(adr+0x55) = 0xAA;
 
-	udelay(1);
-	*(adr+0xAA) = 0x55;
-	udelay(1);
-	*(adr+0x55) = 0xA0;
-	udelay(1);
+	*(adr+0x55) = 0xAA; udelay (1);
+	*(adr+0xAA) = 0x55; udelay (1);
+	*(adr+0x55) = 0xA0; udelay (1);
 	*addr = value;
 
 	status = *addr;
-	do{
-
+	do {
 		oldstatus = status;
 		status = *addr;
 
-		if ((oldstatus & 0x40) == (status & 0x40)){
+		if ((oldstatus & 0x40) == (status & 0x40)) {
 			return 4;
 		}
 		cnt++;
-		if (cnt > 10000){
+		if (cnt > 10000) {
 			return 2;
 		}
-	}while( (status & 0x20) == 0 );
+	} while ( (status & 0x20) == 0 );
 
 	oldstatus = *addr;
 	status = *addr;
 
-	if ((oldstatus & 0x40) == (status & 0x40)) return 0;
-	else {
+	if ((oldstatus & 0x40) == (status & 0x40)) {
+		return 0;
+	} else {
 		*(adr+0x55) = 0xF0;
 		return 1;
 	}
 }
 
-unsigned update_flash(unsigned char* buf){
-	switch((*buf) & 0x3){
-		case TRY_WORKING:
-			printf("found 3 and converted it to 2\n");
-			write_flash(buf, (*buf) & 0xFE);
-			*((unsigned char *)0xFF800000) = 0xF0;
-			udelay(100);
-			printf("buf [%#010x] %#010x\n",buf,(*buf));
-		case BOOT_WORKING :
-			return BOOT_WORKING;
+unsigned update_flash (unsigned char *buf)
+{
+	switch ((*buf) & 0x3) {
+	case TRY_WORKING:
+		printf ("found 3 and converted it to 2\n");
+		write_flash ((char *)buf, (*buf) & 0xFE);
+		*((unsigned char *)0xFF800000) = 0xF0;
+		udelay (100);
+		printf ("buf [%#010x] %#010x\n", buf, (*buf));
+		/* XXX - fall through??? */
+	case BOOT_WORKING :
+		return BOOT_WORKING;
 	}
 	return BOOT_DEFAULT;
 }
 
-unsigned scan_flash(void)
+unsigned scan_flash (void)
 {
 	char section[] =  "kernel";
-	ulong   sp;
 	int cfgFileLen  =  (CFG_FLASH_ERASE_SECTOR_LENGTH >> 1);
 	int sectionPtr  = 0;
 	int foundItem   = 0; /* 0: None, 1: section found, 2: "=" found */
@@ -198,57 +196,54 @@
 
 	buf = (unsigned char*)(CFG_FLASH_RANGE_BASE + CFG_FLASH_RANGE_SIZE \
 			- CFG_FLASH_ERASE_SECTOR_LENGTH);
-	for(bufPtr = 0; bufPtr < cfgFileLen; ++bufPtr){
+	for (bufPtr = 0; bufPtr < cfgFileLen; ++bufPtr) {
 		if ((buf[bufPtr]==0xFF) && (*(int*)(buf+bufPtr)==0xFFFFFFFF)) {
 			return BOOT_DEFAULT;
 		}
-		switch(foundItem)
-		{
-			/* This is the scanning loop, we try to find a particular
-			 * quoted value
-			 */
-			case 0:
-				if((section[sectionPtr] == 0)){
-					++foundItem;
-				}
-				else if(buf[bufPtr] == section[sectionPtr]){
-					++sectionPtr;
-				}
-				else {
-					sectionPtr = 0;
-				}
-				break;
-			case 1:
+		/* This is the scanning loop, we try to find a particular
+		 * quoted value
+		 */
+		switch (foundItem) {
+		case 0:
+			if ((section[sectionPtr] == 0)) {
 				++foundItem;
-				break;
-			case 2:
-				++foundItem;
-				break;
-			case 3:
-			default:
-				return update_flash(buf[bufPtr - 1]);
+			} else if (buf[bufPtr] == section[sectionPtr]) {
+				++sectionPtr;
+			} else {
+				sectionPtr = 0;
+			}
+			break;
+		case 1:
+			++foundItem;
+			break;
+		case 2:
+			++foundItem;
+			break;
+		case 3:
+		default:
+			return update_flash (&buf[bufPtr - 1]);
 		}
 	}
 
-	printf("Failed to read %s\n",section);
+	printf ("Failed to read %s\n",section);
 	return BOOT_DEFAULT;
 }
 
-TSBootInfo* find_boot_info(void)
+TSBootInfo* find_boot_info (void)
 {
-	unsigned bootimage = scan_flash();
-	TSBootInfo* info = (TSBootInfo*)malloc(sizeof(TSBootInfo));
+	unsigned bootimage = scan_flash ();
+	TSBootInfo* info = (TSBootInfo*)malloc (sizeof(TSBootInfo));
 
-	switch(bootimage){
-		case TRY_WORKING:
-				info->address = CFG_WORKING_KERNEL_ADDRESS;
-				break;
-		case BOOT_WORKING :
-				info->address = CFG_WORKING_KERNEL_ADDRESS;
-				break;
-		case BOOT_DEFAULT:
-		default:
-				info->address= CFG_DEFAULT_KERNEL_ADDRESS;
+	switch (bootimage) {
+	case TRY_WORKING:
+		info->address = CFG_WORKING_KERNEL_ADDRESS;
+		break;
+	case BOOT_WORKING :
+		info->address = CFG_WORKING_KERNEL_ADDRESS;
+		break;
+	case BOOT_DEFAULT:
+	default:
+		info->address= CFG_DEFAULT_KERNEL_ADDRESS;
 
 	}
 	info->size = *((unsigned int *)(info->address ));
@@ -256,43 +251,44 @@
 	return info;
 }
 
-void barcobcd_boot(void)
+void barcobcd_boot (void)
 {
 	TSBootInfo* start;
 	char *bootm_args[2];
 	char *buf;
 	int cnt;
+	extern int do_bootm (cmd_tbl_t *, int, int, char *[]);
 
 	buf = (char *)(0x00800000);
 	/* make certain there are enough chars to print the command line here!
 	 */
-	bootm_args[0]=(char *)malloc(16*sizeof(char));
-	bootm_args[1]=(char *)malloc(16*sizeof(char));
+	bootm_args[0] = (char *)malloc (16*sizeof(char));
+	bootm_args[1] = (char *)malloc (16*sizeof(char));
 
-	start = find_boot_info();
+	start = find_boot_info ();
 
-	printf("Booting kernel at address %#10x with size %#10x\n",
+	printf ("Booting kernel at address %#10x with size %#10x\n",
 			start->address, start->size);
 
 	/* give length of the kernel image to bootm */
-	sprintf(bootm_args[0],"%x",start->size);
+	sprintf (bootm_args[0],"%x",start->size);
 	/* give address of the kernel image to bootm */
-	sprintf(bootm_args[1],"%x",buf);
+	sprintf (bootm_args[1],"%x",buf);
 
-	printf("flash address: %#10x\n",start->address+8);
-	printf("buf address: %#10x\n",buf);
+	printf ("flash address: %#10x\n",start->address+8);
+	printf ("buf address: %#10x\n",buf);
 
 	/* aha, we reserve 8 bytes here... */
-	for (cnt = 0; cnt < start->size ; cnt++){
+	for (cnt = 0; cnt < start->size ; cnt++) {
 		buf[cnt] = ((char *)start->address)[cnt+8];
 	}
 
 	/* initialise RAM memory */
 	*((unsigned int *)0xFEC00000) = 0x00141A98;
-	do_bootm(NULL,0,2,bootm_args);
+	do_bootm (NULL,0,2,bootm_args);
 }
 
-int barcobcd_boot_image(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int barcobcd_boot_image (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 #if 0
 	if (argc > 1) {
@@ -300,7 +296,7 @@
 		return 1;
 	}
 #endif
-	barcobcd_boot();
+	barcobcd_boot ();
 
 	return 0;
 }
@@ -308,19 +304,19 @@
 /* Currently, boot_working and boot_default are the same command. This is
  * left in here to see what we'll do in the future */
 
-U_BOOT_CMD(
+U_BOOT_CMD (
 		try_working, 1, 1, barcobcd_boot_image,
 		" try_working - check flash value and boot the appropriate image\n",
 		"\n"
 	  );
 
-U_BOOT_CMD(
+U_BOOT_CMD (
 		boot_working, 1, 1, barcobcd_boot_image,
 		" boot_working - check flash value and boot the appropriate image\n",
 		"\n"
 	  );
 
-U_BOOT_CMD(
+U_BOOT_CMD (
 		boot_default, 1, 1, barcobcd_boot_image,
 		" boot_default - check flash value and boot the appropriate image\n",
 		"\n"
@@ -328,13 +324,40 @@
 /*
  * We are not using serial communication, so just provide empty functions
  */
-int serial_init(void){return 0;}
-void serial_setbrg(void){}
-void serial_putc(const char c){}
-void serial_puts(const char *c){}
-void serial_addr(unsigned int i){}
-int serial_getc(void){return 0;}
-int serial_tstc(void){return 0;}
+int serial_init (void)
+{
+	return 0;
+}
+void serial_setbrg (void)
+{
+	return;
+}
+void serial_putc (const char c)
+{
+	return;
+}
+void serial_puts (const char *c)
+{
+	return;
+}
+void serial_addr (unsigned int i)
+{
+	return;
+}
+int serial_getc (void)
+{
+	return 0;
+}
+int serial_tstc (void)
+{
+	return 0;
+}
 
-unsigned long post_word_load(void){return 0l;};
-void post_word_store(unsigned long val){}
+unsigned long post_word_load (void)
+{
+	return 0l;
+}
+void post_word_store (unsigned long val)
+{
+	return;
+}
diff --git a/board/c2mon/c2mon.c b/board/c2mon/c2mon.c
index 873ff8c..ca8eb0c 100644
--- a/board/c2mon/c2mon.c
+++ b/board/c2mon/c2mon.c
@@ -91,7 +91,7 @@
 
 int checkboard (void)
 {
-	unsigned char *s = getenv ("serial#");
+	unsigned char *s = (unsigned char *)getenv ("serial#");
 
 	puts ("Board: TTTech C2MON ");
 
@@ -155,7 +155,7 @@
 	 * try 8 column mode
 	 */
 	size8 = dram_size (CFG_MAMR_8COL,
-			   (ulong *)SDRAM_BASE2_PRELIM,
+			   SDRAM_BASE2_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	udelay (1000);
@@ -164,7 +164,7 @@
 	 * try 9 column mode
 	 */
 	size9 = dram_size (CFG_MAMR_9COL,
-			   (ulong *) SDRAM_BASE2_PRELIM,
+			   SDRAM_BASE2_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
diff --git a/board/cray/L1/L1.c b/board/cray/L1/L1.c
index fb28c42..a7114eb 100644
--- a/board/cray/L1/L1.c
+++ b/board/cray/L1/L1.c
@@ -133,7 +133,7 @@
 /* ------------------------------------------------------------------------- */
 int misc_init_r (void)
 {
-	unsigned char *s, *e;
+	char *s, *e;
 	image_header_t *hdr;
 	time_t timestamp;
 	struct rtc_time tm;
@@ -146,7 +146,7 @@
 
 #define FACTORY_SETTINGS 0xFFFC0000
 	if ((s = getenv ("ethaddr")) == NULL) {
-		e = (unsigned char *) (FACTORY_SETTINGS);
+		e = (char *) (FACTORY_SETTINGS);
 		if (*(e + 0) != '0'
 			|| *(e + 1) != '0'
 			|| *(e + 2) != ':'
@@ -314,7 +314,7 @@
 	{
 		setenv (Things[thing].envname, Things[thing].dhcpvalue);
 	}
-	return (Things[thing].dhcpvalue);
+	return ((u8 *)(Things[thing].dhcpvalue));
 }
 
 /* ------------------------------------------------------------------------- */
diff --git a/board/dave/PPChameleonEVB/PPChameleonEVB.c b/board/dave/PPChameleonEVB/PPChameleonEVB.c
index b425d63..5f2c705 100644
--- a/board/dave/PPChameleonEVB/PPChameleonEVB.c
+++ b/board/dave/PPChameleonEVB/PPChameleonEVB.c
@@ -185,7 +185,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/eltec/bab7xx/misc.c b/board/eltec/bab7xx/misc.c
index b50d11b..6a24807 100644
--- a/board/eltec/bab7xx/misc.c
+++ b/board/eltec/bab7xx/misc.c
@@ -58,7 +58,7 @@
 int misc_init_r (void)
 {
     revinfo eerev;
-    u_char *ptr;
+    char *ptr;
     u_int  i, l, initSrom, copyNv;
     char buf[256];
     char hex[23] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0,
@@ -139,7 +139,7 @@
     if (strcmp (eerev.magic, "ELTEC") != 0)
     {
 	/* srom is not initialized -> create a default revision info */
-	for (i = 0, ptr = (u_char *)&eerev; i < sizeof(revinfo); i++)
+	for (i = 0, ptr = (char *)&eerev; i < sizeof(revinfo); i++)
 	    *ptr++ = 0x00;
 	strcpy(eerev.magic, "ELTEC");
 	eerev.revrev[0] = 1;
diff --git a/board/eltec/elppc/eepro100_srom.c b/board/eltec/elppc/eepro100_srom.c
index 9754c1d..f021c50 100644
--- a/board/eltec/elppc/eepro100_srom.c
+++ b/board/eltec/elppc/eepro100_srom.c
@@ -57,7 +57,7 @@
 
     /* get onboard network iobase */
     pci_read_config_dword(PCI_BDF(0,0x10,0), PCI_BASE_ADDRESS_0,
-		 &onboard_dev.iobase);
+		 (unsigned int *)&onboard_dev.iobase);
     onboard_dev.iobase &= ~0xf;
 
     source[63] = eepro100_srom_checksum (source);
diff --git a/board/eltec/mhpc/mhpc.c b/board/eltec/mhpc/mhpc.c
index bc3d9f4..0ffbdf0 100644
--- a/board/eltec/mhpc/mhpc.c
+++ b/board/eltec/mhpc/mhpc.c
@@ -160,7 +160,7 @@
 	int i;
 
 	/* check revision data */
-	eeprom_read (CFG_I2C_EEPROM_ADDR, 480, (char *) &mhpcRevInfo, 32);
+	eeprom_read (CFG_I2C_EEPROM_ADDR, 480, (uchar *) &mhpcRevInfo, 32);
 
 	if (strncmp ((char *) &mhpcRevInfo.board[2], "MHPC", 4) != 0) {
 		printf ("Enter revision number (0-9): %c  ",
@@ -228,7 +228,7 @@
 		}
 
 		/* setup new revision data */
-		eeprom_write (CFG_I2C_EEPROM_ADDR, 480, (char *) &mhpcRevInfo,
+		eeprom_write (CFG_I2C_EEPROM_ADDR, 480, (uchar *) &mhpcRevInfo,
 			      32);
 	}
 
@@ -422,8 +422,8 @@
 	immap_t *immr = (immap_t *) CFG_IMMR;
 
 	/* enable video only on CLUT value */
-	if ((penv = getenv ("clut")) != NULL)
-		clut = (u_int) simple_strtoul (penv, NULL, 10);
+	if ((penv = (uchar *)getenv ("clut")) != NULL)
+		clut = (u_int) simple_strtoul ((char *)penv, NULL, 10);
 	else
 		return NULL;
 
diff --git a/board/emk/common/flash.c b/board/emk/common/flash.c
index 28fe29d..d6161bf 100644
--- a/board/emk/common/flash.c
+++ b/board/emk/common/flash.c
@@ -165,7 +165,7 @@
 	int i;
 	uchar *boottype;
 	uchar *bootletter;
-	uchar *fmt;
+	char *fmt;
 	uchar botbootletter[] = "B";
 	uchar topbootletter[] = "T";
 	uchar botboottype[] = "bottom boot sector";
diff --git a/board/emk/common/vpd.c b/board/emk/common/vpd.c
index cbb7f8f..8a3a12b 100644
--- a/board/emk/common/vpd.c
+++ b/board/emk/common/vpd.c
@@ -69,11 +69,11 @@
 		/*printf ("%s\n", buf); */
 		/* search for our specific entry */
 		if (!strncmp ((char *) buf, "[RLA/lan/Ethernet] ", 19)) {
-			setenv ("ethaddr", buf + 19);
+			setenv ("ethaddr", (char *)(buf + 19));
 		} else if (!strncmp ((char *) buf, "[BOARD/SERIAL] ", 15)) {
-			setenv ("serial#", buf + 15);
+			setenv ("serial#", (char *)(buf + 15));
 		} else if (!strncmp ((char *) buf, "[BOARD/TYPE] ", 13)) {
-			setenv ("board_id", buf + 13);
+			setenv ("board_id", (char *)(buf + 13));
 		}
 	}
 }
diff --git a/board/eric/eric.c b/board/eric/eric.c
index 02fe8dc..5413ae1 100644
--- a/board/eric/eric.c
+++ b/board/eric/eric.c
@@ -85,8 +85,8 @@
 
 int checkboard (void)
 {
-	unsigned char *s = getenv ("serial#");
-	unsigned char *e;
+	char *s = getenv ("serial#");
+	char *e;
 
 	puts ("Board: ");
 
diff --git a/board/esd/adciop/adciop.c b/board/esd/adciop/adciop.c
index 93bc843..7a11a12 100644
--- a/board/esd/adciop/adciop.c
+++ b/board/esd/adciop/adciop.c
@@ -60,7 +60,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 
 	puts ("Board: ");
diff --git a/board/esd/ar405/ar405.c b/board/esd/ar405/ar405.c
index 14b0e42..3aac3c6 100644
--- a/board/esd/ar405/ar405.c
+++ b/board/esd/ar405/ar405.c
@@ -155,7 +155,7 @@
 
 	int index;
 	int len;
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 	const unsigned char *fpga;
 
diff --git a/board/esd/ash405/ash405.c b/board/esd/ash405/ash405.c
index 012505e..03ae7fd 100644
--- a/board/esd/ash405/ash405.c
+++ b/board/esd/ash405/ash405.c
@@ -193,7 +193,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esd/canbt/canbt.c b/board/esd/canbt/canbt.c
index ab49249..2ced6cb 100644
--- a/board/esd/canbt/canbt.c
+++ b/board/esd/canbt/canbt.c
@@ -156,7 +156,7 @@
 {
 	int index;
 	int len;
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 
 	puts ("Board: ");
diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c
index 0604a4e..1dceb3a 100644
--- a/board/esd/common/auto_update.c
+++ b/board/esd/common/auto_update.c
@@ -103,7 +103,7 @@
 	/* check the data CRC */
 	checksum = ntohl(hdr->ih_dcrc);
 
-	if (crc32 (0, (char *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size))
+	if (crc32 (0, (uchar *)(LOAD_ADDR + sizeof(*hdr)), ntohl(hdr->ih_size))
 		!= checksum) {
 		printf ("Image %s bad data checksum\n", au_image[i].name);
 		return -1;
@@ -140,7 +140,7 @@
 	checksum = ntohl(hdr->ih_hcrc);
 	hdr->ih_hcrc = 0;
 
-	if (crc32 (0, (char *)hdr, sizeof(*hdr)) != checksum) {
+	if (crc32 (0, (uchar *)hdr, sizeof(*hdr)) != checksum) {
 		printf ("Image %s bad header checksum\n", au_image[i].name);
 		return -1;
 	}
@@ -283,12 +283,12 @@
 		 */
 		if (au_image[i].type != AU_NAND) {
 			debug ("flash_write(%p, %lx %x)\n", addr, start, nbytes);
-			rc = flash_write(addr, start, nbytes);
+			rc = flash_write((uchar *)addr, start, nbytes);
 		} else {
 #if (CONFIG_COMMANDS & CFG_CMD_NAND)
 			debug ("nand_rw(%p, %lx %x)\n", addr, start, nbytes);
 			rc = nand_rw(nand_dev_desc, NANDRW_WRITE | NANDRW_JFFS2,
-				     start, nbytes, &total, addr);
+				     start, nbytes, (size_t *)&total, (uchar *)addr);
 			debug ("nand_rw: ret=%x total=%d nbytes=%d\n", rc, total, nbytes);
 #endif
 		}
@@ -301,12 +301,12 @@
 		 * check the dcrc of the copy
 		 */
 		if (au_image[i].type != AU_NAND) {
-			rc = crc32 (0, (char *)(start + off), ntohl(hdr->ih_size));
+			rc = crc32 (0, (uchar *)(start + off), ntohl(hdr->ih_size));
 		} else {
 #if (CONFIG_COMMANDS & CFG_CMD_NAND)
 			rc = nand_rw(nand_dev_desc, NANDRW_READ | NANDRW_JFFS2 | NANDRW_JFFS2_SKIP,
-				     start, nbytes, &total, addr);
-			rc = crc32 (0, (char *)(addr + off), ntohl(hdr->ih_size));
+				     start, nbytes, (size_t *)&total, (uchar *)addr);
+			rc = crc32 (0, (uchar *)(addr + off), ntohl(hdr->ih_size));
 #endif
 		}
 		if (rc != ntohl(hdr->ih_dcrc)) {
diff --git a/board/esd/common/lcd.c b/board/esd/common/lcd.c
index 05c76ff..0edc083 100644
--- a/board/esd/common/lcd.c
+++ b/board/esd/common/lcd.c
@@ -81,7 +81,7 @@
 	uchar *ptr;
 	ushort *ptr2;
 	ushort val;
-	unsigned char *dst;
+	unsigned char *dst = NULL;
 	int x, y;
 	int width, height, bpp, colors, line_size;
 	int header_size;
@@ -89,7 +89,6 @@
 	unsigned char r, g, b;
 	BITMAPINFOHEADER *bm_info;
 	ulong len;
-	int do_free = 0;
 
 	/*
 	 * Check for bmp mark 'BM'
@@ -99,12 +98,18 @@
 		/*
 		 * Decompress bmp image
 		 */
-		len = CFG_LCD_LOGO_MAX_SIZE;
-		dst = malloc(CFG_LCD_LOGO_MAX_SIZE);
-		do_free = 1;
-		if (gunzip(dst, CFG_LCD_LOGO_MAX_SIZE, (uchar *)logo_bmp, &len) != 0) {
+		len = CFG_VIDEO_LOGO_MAX_SIZE;
+		dst = malloc(CFG_VIDEO_LOGO_MAX_SIZE);
+		if (dst == NULL) {
+			printf("Error: malloc in gunzip failed!\n");
 			return;
 		}
+		if (gunzip(dst, CFG_VIDEO_LOGO_MAX_SIZE, (uchar *)logo_bmp, &len) != 0) {
+			return;
+		}
+		if (len == CFG_VIDEO_LOGO_MAX_SIZE) {
+			printf("Image could be truncated (increase CFG_VIDEO_LOGO_MAX_SIZE)!\n");
+		}
 
 		/*
 		 * Check for bmp mark 'BM'
@@ -147,7 +152,9 @@
 		break;
 	default:
 		printf("LCD: Unknown bpp (%d) im image!\n", bpp);
-		free(dst);
+		if ((dst != NULL) && (dst != (uchar *)logo_bmp)) {
+			free(dst);
+		}
 		return;
 	}
 	printf(" (%d*%d, %dbpp)\n", width, height, bpp);
@@ -205,7 +212,7 @@
 		}
 	}
 
-	if (do_free) {
+	if ((dst != NULL) && (dst != (uchar *)logo_bmp)) {
 		free(dst);
 	}
 }
diff --git a/board/esd/cpci2dp/cpci2dp.c b/board/esd/cpci2dp/cpci2dp.c
index 0949a7d..727640e 100644
--- a/board/esd/cpci2dp/cpci2dp.c
+++ b/board/esd/cpci2dp/cpci2dp.c
@@ -95,7 +95,7 @@
  */
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esd/cpci405/cpci405.c b/board/esd/cpci405/cpci405.c
index f27668d..2ab9673 100644
--- a/board/esd/cpci405/cpci405.c
+++ b/board/esd/cpci405/cpci405.c
@@ -440,7 +440,7 @@
 	int index;
 	int len;
 #endif
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 	unsigned short ver;
 
@@ -468,7 +468,7 @@
 #endif
 
 	if (ctermm2()) {
-		unsigned char str[4];
+		char str[4];
 
 		/*
 		 * Read board-id and save in env-variable
@@ -664,7 +664,7 @@
 	int result;
 	int i;
 	unsigned char ow_id[6];
-	unsigned char str[32];
+	char str[32];
 	unsigned char ow_crc;
 
 	/*
@@ -717,10 +717,10 @@
 	IPaddr_t ipaddr;
 
 	buf = malloc(CFG_ENV_SIZE_2);
-	if (eeprom_read(CFG_I2C_EEPROM_ADDR_2, 0, buf, CFG_ENV_SIZE_2)) {
+	if (eeprom_read(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CFG_ENV_SIZE_2)) {
 		puts("\nError reading backplane EEPROM!\n");
 	} else {
-		crc = crc32(0, buf+4, CFG_ENV_SIZE_2-4);
+		crc = crc32(0, (uchar *)(buf+4), CFG_ENV_SIZE_2-4);
 		if (crc != *(ulong *)buf) {
 			printf("ERROR: crc mismatch %08lx %08lx\n", crc, *(ulong *)buf);
 			return -1;
@@ -766,7 +766,7 @@
 int do_set_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	char *buf;
-	unsigned char str[32];
+	char str[32];
 	ulong crc;
 
 	if (argc < 2) {
@@ -779,10 +779,10 @@
 	memset(buf, 0, CFG_ENV_SIZE_2);
 	sprintf(str, "bp_ip=%s", argv[1]);
 	strcpy(buf+4, str);
-	crc = crc32(0, buf+4, CFG_ENV_SIZE_2-4);
+	crc = crc32(0, (uchar *)(buf+4), CFG_ENV_SIZE_2-4);
 	*(ulong *)buf = crc;
 
-	if (eeprom_write(CFG_I2C_EEPROM_ADDR_2, 0, buf, CFG_ENV_SIZE_2)) {
+	if (eeprom_write(CFG_I2C_EEPROM_ADDR_2, 0, (uchar *)buf, CFG_ENV_SIZE_2)) {
 		puts("\nError writing backplane EEPROM!\n");
 	}
 
diff --git a/board/esd/cpci5200/cpci5200.c b/board/esd/cpci5200/cpci5200.c
index 01c4171..6c98f13 100644
--- a/board/esd/cpci5200/cpci5200.c
+++ b/board/esd/cpci5200/cpci5200.c
@@ -105,9 +105,9 @@
 
 	/* find RAM size using SDRAM CS0 only */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000);
 
 	if (test1 > test2) {
 		sdram_start(0);
diff --git a/board/esd/cpci750/cpci750.c b/board/esd/cpci750/cpci750.c
index 68f121d..e4b062b 100644
--- a/board/esd/cpci750/cpci750.c
+++ b/board/esd/cpci750/cpci750.c
@@ -555,7 +555,7 @@
 int mem_test_data (void)
 {
 	unsigned long long *pmem = (unsigned long long *) CFG_MEMTEST_START;
-	unsigned long long temp64;
+	unsigned long long temp64 = 0;
 	int num_patterns = sizeof (pattern) / sizeof (pattern[0]);
 	int i;
 	unsigned int hi, lo;
@@ -662,7 +662,7 @@
 	       unsigned long long wmask, short read, short write)
 {
 	unsigned int i;
-	unsigned long long temp;
+	unsigned long long temp = 0;
 	unsigned int hitemp, lotemp, himask, lomask;
 
 	for (i = 0; i < size; i++) {
diff --git a/board/esd/cpci750/mv_eth.c b/board/esd/cpci750/mv_eth.c
index e2719b9..880528f 100644
--- a/board/esd/cpci750/mv_eth.c
+++ b/board/esd/cpci750/mv_eth.c
@@ -267,8 +267,9 @@
 		dev->send = (void *) db64360_eth_transmit;
 		dev->recv = (void *) db64360_eth_poll;
 
-		dev->priv = (void *) ethernet_private =
+		ethernet_private =
 			calloc (sizeof (*ethernet_private), 1);
+		dev->priv = (void *) ethernet_private;
 		if (!ethernet_private) {
 			printf ("%s: %s allocation failure, %s\n",
 				__FUNCTION__, dev->name,
@@ -281,8 +282,9 @@
 		memcpy (ethernet_private->port_mac_addr, dev->enetaddr, 6);
 
 		/* set pointer to memory for stats data structure etc... */
-		ethernet_private->port_private = (void *) port_private =
+		port_private =
 			calloc (sizeof (*ethernet_private), 1);
+		ethernet_private->port_private = (void *)port_private; 
 		if (!port_private) {
 			printf ("%s: %s allocation failure, %s\n",
 				__FUNCTION__, dev->name,
diff --git a/board/esd/cpciiser4/cpciiser4.c b/board/esd/cpciiser4/cpciiser4.c
index 3d1f1fa..7bf7bb5 100644
--- a/board/esd/cpciiser4/cpciiser4.c
+++ b/board/esd/cpciiser4/cpciiser4.c
@@ -153,7 +153,7 @@
 {
 	int index;
 	int len;
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 
 	puts ("Board: ");
diff --git a/board/esd/dasa_sim/cmd_dasa_sim.c b/board/esd/dasa_sim/cmd_dasa_sim.c
index 9edb3af..89a4aaf 100644
--- a/board/esd/dasa_sim/cmd_dasa_sim.c
+++ b/board/esd/dasa_sim/cmd_dasa_sim.c
@@ -111,7 +111,7 @@
 		for (i = 0; i < 4; i++) {
 			pci_read_config_dword (CFG_PCI9054_DEV_FN,
 						l * 16 + i * 4,
-						&val);
+						(unsigned int *)&val);
 			printf ("%08x ", val);
 		}
 		printf ("\n");
diff --git a/board/esd/dasa_sim/dasa_sim.c b/board/esd/dasa_sim/dasa_sim.c
index 57a971f..2f8ab1a 100644
--- a/board/esd/dasa_sim/dasa_sim.c
+++ b/board/esd/dasa_sim/dasa_sim.c
@@ -162,7 +162,7 @@
 {
 	int index;
 	int len;
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 	int fpga;
 	unsigned short val;
diff --git a/board/esd/dp405/dp405.c b/board/esd/dp405/dp405.c
index 056063e..fd51f7f 100644
--- a/board/esd/dp405/dp405.c
+++ b/board/esd/dp405/dp405.c
@@ -100,7 +100,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 	unsigned char trans[16] = {0x0,0x8,0x4,0xc,0x2,0xa,0x6,0xe,
 				   0x1,0x9,0x5,0xd,0x3,0xb,0x7,0xf};
diff --git a/board/esd/du405/du405.c b/board/esd/du405/du405.c
index 7db2a60..26e8341 100644
--- a/board/esd/du405/du405.c
+++ b/board/esd/du405/du405.c
@@ -162,7 +162,7 @@
 {
 	int index;
 	int len;
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 
 	puts ("Board: ");
diff --git a/board/esd/hub405/hub405.c b/board/esd/hub405/hub405.c
index bbd8555..e77dba8 100644
--- a/board/esd/hub405/hub405.c
+++ b/board/esd/hub405/hub405.c
@@ -210,7 +210,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esd/ocrtc/ocrtc.c b/board/esd/ocrtc/ocrtc.c
index ac032ef..261b8a5 100644
--- a/board/esd/ocrtc/ocrtc.c
+++ b/board/esd/ocrtc/ocrtc.c
@@ -74,7 +74,7 @@
  */
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 
 	puts ("Board: ");
diff --git a/board/esd/pci405/cmd_pci405.c b/board/esd/pci405/cmd_pci405.c
index e1ca583..0315c3d 100644
--- a/board/esd/pci405/cmd_pci405.c
+++ b/board/esd/pci405/cmd_pci405.c
@@ -91,7 +91,7 @@
 			pci_read_config_dword(PCIDEVID_405GP, i, ptr++);
 		}
 		ptr = (unsigned int *)PCI_REGS_ADDR;
-		*ptr = crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4);
+		*ptr = crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4);
 
 		printf("\nStoring PCI Configuration Regs...\n");
 	} else {
@@ -874,7 +874,7 @@
 		pci_read_config_dword(PCIDEVID_405GP, i, ptr++);
 	}
 	ptr = (unsigned int *)PCI_REGS_ADDR;
-	*ptr = crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4);
+	*ptr = crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4);
 
 	printf("\nStoring PCI Configuration Regs...\n");
 
@@ -896,7 +896,7 @@
 	 * Rewrite pci config regs (only after soft-reset with magic set)
 	 */
 	ptr = (unsigned int *)PCI_REGS_ADDR;
-	if (crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) {
+	if (crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) {
 		puts("Restoring PCI Configurations Regs!\n");
 		ptr = (unsigned int *)PCI_REGS_ADDR + 1;
 		for (i=0; i<0x40; i+=4) {
diff --git a/board/esd/pci405/pci405.c b/board/esd/pci405/pci405.c
index d1b6807..4be4d7e 100644
--- a/board/esd/pci405/pci405.c
+++ b/board/esd/pci405/pci405.c
@@ -275,7 +275,7 @@
 		 * Rewrite pci config regs (only after soft-reset with magic set)
 		 */
 		ptr = (unsigned int *)PCI_REGS_ADDR;
-		if (crc32(0, (char *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) {
+		if (crc32(0, (uchar *)PCI_REGS_ADDR+4, PCI_REGS_LEN-4) == *ptr) {
 			puts("Restoring PCI Configurations Regs!\n");
 			ptr = (unsigned int *)PCI_REGS_ADDR + 1;
 			for (i=0; i<0x40; i+=4) {
@@ -322,7 +322,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esd/pf5200/flash.c b/board/esd/pf5200/flash.c
index bfbd090..53afbc0 100644
--- a/board/esd/pf5200/flash.c
+++ b/board/esd/pf5200/flash.c
@@ -122,7 +122,7 @@
 
 void flash_print_info(flash_info_t * info) {
 	int i;
-	uchar *fmt;
+	char *fmt;
 
 	if (info->flash_id == FLASH_UNKNOWN) {
 		printf("missing or unknown FLASH type\n");
diff --git a/board/esd/pf5200/pf5200.c b/board/esd/pf5200/pf5200.c
index fa71c79..2b47012 100644
--- a/board/esd/pf5200/pf5200.c
+++ b/board/esd/pf5200/pf5200.c
@@ -105,9 +105,9 @@
 
 	/* find RAM size using SDRAM CS0 only */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *) CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *) CFG_SDRAM_BASE, 0x80000000);
 
 	if (test1 > test2) {
 		sdram_start(0);
diff --git a/board/esd/plu405/plu405.c b/board/esd/plu405/plu405.c
index e3eff31..16f2360 100644
--- a/board/esd/plu405/plu405.c
+++ b/board/esd/plu405/plu405.c
@@ -203,7 +203,7 @@
  */
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esd/pmc405/pmc405.c b/board/esd/pmc405/pmc405.c
index a72547d..33b5f77 100644
--- a/board/esd/pmc405/pmc405.c
+++ b/board/esd/pmc405/pmc405.c
@@ -107,7 +107,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esd/voh405/voh405.c b/board/esd/voh405/voh405.c
index 9cea69f..eda3fd9 100644
--- a/board/esd/voh405/voh405.c
+++ b/board/esd/voh405/voh405.c
@@ -268,7 +268,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esd/wuh405/wuh405.c b/board/esd/wuh405/wuh405.c
index 09c4d36..db24122 100644
--- a/board/esd/wuh405/wuh405.c
+++ b/board/esd/wuh405/wuh405.c
@@ -193,7 +193,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/esteem192e/esteem192e.c b/board/esteem192e/esteem192e.c
index 5c3e9b4..3959eea 100644
--- a/board/esteem192e/esteem192e.c
+++ b/board/esteem192e/esteem192e.c
@@ -147,8 +147,8 @@
 	 * Check Bank 0 Memory Size for re-configuration
 	 *
 	 */
-	size_b0 = get_ram_size ((ulong *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
-	size_b1 = get_ram_size ((ulong *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
+	size_b0 = get_ram_size ( (long *)SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
+	size_b1 = get_ram_size ( (long *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
 
 	printf ("\nbank 0 size %lu\nbank 1 size %lu\n", size_b0, size_b1);
 
diff --git a/board/etx094/etx094.c b/board/etx094/etx094.c
index efe7cb2..dba3c11 100644
--- a/board/etx094/etx094.c
+++ b/board/etx094/etx094.c
@@ -92,8 +92,8 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	unsigned char *s = getenv ("serial#");
-	unsigned char *e;
+	char *s = getenv ("serial#");
+	char *e;
 
 	puts ("Board: ");
 
@@ -186,7 +186,7 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	udelay (1000);
@@ -194,7 +194,7 @@
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
@@ -215,7 +215,7 @@
 		 *  but then only half the real size will be used.]
 		 */
 		size_b1 =
-				dram_size (memctl->memc_mamr, (ulong *) SDRAM_BASE3_PRELIM,
+				dram_size (memctl->memc_mamr, (long *) SDRAM_BASE3_PRELIM,
 						   SDRAM_MAX_SIZE);
 /*	debug ("SDRAM Bank 1: %ld MB\n", size8 >> 20);	*/
 	} else {
diff --git a/board/evb64260/eth.c b/board/evb64260/eth.c
index f0743fa..a248cad 100644
--- a/board/evb64260/eth.c
+++ b/board/evb64260/eth.c
@@ -182,7 +182,7 @@
 	 */
 
 	/* let the upper layer handle the packet */
-	NetReceive (eth_data, eth_len);
+	NetReceive ((uchar *)eth_data, eth_len);
 
 	rx->buff_size_byte_count = GT6426x_ETH_BUF_SIZE<<16;
 
@@ -266,7 +266,7 @@
 #endif
 	memcpy(dev->eth_tx_buffer, (char *) p, s);
 
-	tx->buff_pointer = dev->eth_tx_buffer;
+	tx->buff_pointer = (uchar *)dev->eth_tx_buffer;
 	tx->bytecount_reserved = ((__u16)s) << 16;
 
 	/*    31 - own
@@ -583,7 +583,7 @@
 
 	/* Initialize Rx Side */
 	for (temp = 0; temp < NR; temp++) {
-		p->eth_rx_desc[temp].buff_pointer = p->eth_rx_buffer[temp];
+		p->eth_rx_desc[temp].buff_pointer = (uchar *)p->eth_rx_buffer[temp];
 		p->eth_rx_desc[temp].buff_size_byte_count = GT6426x_ETH_BUF_SIZE<<16;
 
 		/* GT96100 Owner */
@@ -719,7 +719,8 @@
 		dev->send = (void*)gt6426x_eth_transmit;
 		dev->recv = (void*)gt6426x_eth_poll;
 
-		dev->priv = (void*)p = calloc( sizeof(*p), 1 );
+		p = calloc( sizeof(*p), 1 );
+		dev->priv = (void*)p;
 		if (!p)
 		{
 			printf( "%s: %s allocation failure, %s\n",
diff --git a/board/evb64260/eth.h b/board/evb64260/eth.h
index ecc3762..beb6db1 100644
--- a/board/evb64260/eth.h
+++ b/board/evb64260/eth.h
@@ -39,14 +39,14 @@
 	volatile struct eth0_tx_desc_struct * next_desc;
 	/* Note - the following will not work for 64 bit addressing */
 	volatile unsigned char * buff_pointer;
-} eth0_tx_desc_single __attribute__ ((packed));
+} __attribute__ ((packed)) eth0_tx_desc_single;
 
 typedef struct eth0_rx_desc_struct {
   volatile __u32 buff_size_byte_count;
   volatile __u32 command_status;
   volatile struct eth0_rx_desc_struct * next_desc;
   volatile unsigned char * buff_pointer;
-} eth0_rx_desc_single __attribute__ ((packed));
+} __attribute__ ((packed)) eth0_rx_desc_single;
 
 #define NT 20 /* Number of Transmit buffers */
 #define NR 20 /* Number of Receive buffers */
diff --git a/board/evb64260/eth_addrtbl.c b/board/evb64260/eth_addrtbl.c
index 0abc7d4..69882f5 100644
--- a/board/evb64260/eth_addrtbl.c
+++ b/board/evb64260/eth_addrtbl.c
@@ -55,8 +55,9 @@
 		int bytes =
 			hashLength[hashSizeSelector] * sizeof (addrTblEntry);
 
-		tableBase = (unsigned int) realAddrTableBase[port] =
+		realAddrTableBase[port] =
 			malloc (bytes + 64);
+		tableBase = (unsigned int)realAddrTableBase; 
 
 		if (!tableBase) {
 			printf ("%s: alloc memory failed \n", __FUNCTION__);
diff --git a/board/evb64260/flash.c b/board/evb64260/flash.c
index 7ca6f0a..6ab23dc 100644
--- a/board/evb64260/flash.c
+++ b/board/evb64260/flash.c
@@ -589,7 +589,7 @@
 int
 flash_erase (flash_info_t *info, int s_first, int s_last)
 {
-	volatile unsigned char *addr = (char *)(info->start[0]);
+	volatile unsigned char *addr = (uchar *)(info->start[0]);
 	int flag, prot, sect, l_sect;
 	ulong start, now, last;
 
@@ -600,7 +600,7 @@
 	if((info->flash_id & FLASH_TYPEMASK) == FLASH_RAM) {
 	    for (sect = s_first; sect<=s_last; sect++) {
 		int sector_size=info->size/info->sector_count;
-		addr = (char *)(info->start[sect]);
+		addr = (uchar *)(info->start[sect]);
 		memset((void *)addr, 0, sector_size);
 	    }
 	    return 0;
@@ -658,7 +658,7 @@
 	/* Start erase on unprotected sectors */
 	for (sect = s_first; sect<=s_last; sect++) {
 		if (info->protect[sect] == 0) {	/* not protected */
-			addr = (char *)(info->start[sect]);
+			addr = (uchar *)(info->start[sect]);
 			flash_cmd(info->portwidth,addr,0,0x30);
 			l_sect = sect;
 		}
@@ -794,7 +794,7 @@
 static int
 write_word (flash_info_t *info, ulong dest, ulong data)
 {
-	volatile unsigned char *addr = (char *)(info->start[0]);
+	volatile unsigned char *addr = (uchar *)(info->start[0]);
 	ulong start;
 	int flag, i;
 
diff --git a/board/evb64260/i2c.c b/board/evb64260/i2c.c
index 22cb809..c62b647 100644
--- a/board/evb64260/i2c.c
+++ b/board/evb64260/i2c.c
@@ -146,7 +146,7 @@
 static uchar
 i2c_get_data(uchar* return_data, int len) {
 
-	unsigned int data, status;
+	unsigned int data, status = 0;
 	int count = 0;
 
 	DP(puts("i2c_get_data\n"));
diff --git a/board/evb64260/zuma_pbb_mbox.c b/board/evb64260/zuma_pbb_mbox.c
index 5131339..2b9a469 100644
--- a/board/evb64260/zuma_pbb_mbox.c
+++ b/board/evb64260/zuma_pbb_mbox.c
@@ -116,7 +116,7 @@
 static void
 zuma_mbox_setenv(void)
 {
-  unsigned char *data, buf[32];
+  char *data, buf[32];
   unsigned char save = 0;
 
   data = getenv("baudrate");
diff --git a/board/g2000/g2000.c b/board/g2000/g2000.c
index 5967e90..3f78753 100644
--- a/board/g2000/g2000.c
+++ b/board/g2000/g2000.c
@@ -90,7 +90,7 @@
  */
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/gen860t/gen860t.c b/board/gen860t/gen860t.c
index f1d173e..b7a1b56 100644
--- a/board/gen860t/gen860t.c
+++ b/board/gen860t/gen860t.c
@@ -128,8 +128,8 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	unsigned char *s;
-	unsigned char buf[64];
+	char *s;
+	char buf[64];
 	int i;
 
 	i = getenv_r ("board_id", buf, sizeof (buf));
@@ -266,7 +266,7 @@
 int last_stage_init (void)
 {
 #if !defined(CONFIG_SC)
-	unsigned char buf[256];
+	char buf[256];
 	int i;
 
 	/*
diff --git a/board/genietv/flash.c b/board/genietv/flash.c
index f12d0be..1c1728b 100644
--- a/board/genietv/flash.c
+++ b/board/genietv/flash.c
@@ -188,12 +188,11 @@
 #endif
 	switch (value)
 	{
-		case 0x01:
-		case AMD_MANUFACT:
+		case 0x1: /* AMD_MANUFACT */
 			info->flash_id = FLASH_MAN_AMD;
 		break;
 
-		case FUJ_MANUFACT:
+		case 0x4: /* FUJ_MANUFACT */
 			info->flash_id = FLASH_MAN_FUJ;
 		break;
 
diff --git a/board/genietv/genietv.c b/board/genietv/genietv.c
index c19841a..5f8c899 100644
--- a/board/genietv/genietv.c
+++ b/board/genietv/genietv.c
@@ -187,14 +187,14 @@
 	PrintState ();
 #endif
 /*    printf ("\nChecking bank1..."); */
-	size8 = dram_size (CFG_MBMR_8COL, (ulong *) SDRAM_BASE1_PRELIM,
+	size8 = dram_size (CFG_MBMR_8COL, (long *) SDRAM_BASE1_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	size_b0 = size8;
 
 /*    printf ("\nChecking bank2..."); */
 	size_b1 =
-		dram_size (memctl->memc_mbmr, (ulong *) SDRAM_BASE2_PRELIM,
+		dram_size (memctl->memc_mbmr, (long *) SDRAM_BASE2_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	/*
diff --git a/board/gth/flash.c b/board/gth/flash.c
index c8b56fb..41a5c50 100644
--- a/board/gth/flash.c
+++ b/board/gth/flash.c
@@ -261,7 +261,7 @@
 #if 0
 	ulong base = (ulong)addr;
 #endif
-	uchar value;
+	ulong value;
 
 	/* Write auto select command: read Manufacturer ID */
 #if 0
@@ -278,7 +278,7 @@
 
 	switch (value)
 	{
-		case AMD_MANUFACT:case 0x01:
+		case AMD_MANUFACT:
 			info->flash_id = FLASH_MAN_AMD;
 		break;
 
diff --git a/board/gth/gth.c b/board/gth/gth.c
index 6f972ce..b1fcbf5 100644
--- a/board/gth/gth.c
+++ b/board/gth/gth.c
@@ -589,7 +589,7 @@
 		(Rx[8] != ':') | (Rx[11] != ':') | (Rx[14] != ':')) {
 		printf ("*** ethernet addr invalid, using default ***\n");
 	} else {
-		setenv ("ethaddr", Rx);
+		setenv ("ethaddr", (char *)Rx);
 	}
 	return (0);
 }
diff --git a/board/gw8260/gw8260.c b/board/gw8260/gw8260.c
index 163d58c..2719a95 100644
--- a/board/gw8260/gw8260.c
+++ b/board/gw8260/gw8260.c
@@ -320,7 +320,7 @@
 int mem_test_data (void)
 {
 	unsigned long long *pmem = (unsigned long long *) CFG_SDRAM_BASE;
-	unsigned long long temp64;
+	unsigned long long temp64 = 0;
 	int num_patterns = sizeof (pattern) / sizeof (pattern[0]);
 	int i;
 	unsigned int hi, lo;
@@ -427,7 +427,7 @@
 	       unsigned long long wmask, short read, short write)
 {
 	unsigned int i;
-	unsigned long long temp;
+	unsigned long long temp = 0;
 	unsigned int hitemp, lotemp, himask, lomask;
 
 	for (i = 0; i < size; i++) {
diff --git a/board/hermes/hermes.c b/board/hermes/hermes.c
index 7490324..e95d9ee 100644
--- a/board/hermes/hermes.c
+++ b/board/hermes/hermes.c
@@ -107,8 +107,8 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	unsigned char *s = getenv ("serial#");
-	unsigned char *e;
+	char *s = getenv ("serial#");
+	char *e;
 
 	puts ("Board: ");
 
@@ -179,7 +179,7 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	udelay (1000);
@@ -187,7 +187,7 @@
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
diff --git a/board/hymod/eeprom.c b/board/hymod/eeprom.c
index 15eb48e..c9b9b18 100644
--- a/board/hymod/eeprom.c
+++ b/board/hymod/eeprom.c
@@ -58,7 +58,7 @@
 	eeprom_read (dev_addr, offset, (uchar *)&crc, sizeof (ulong));
 	offset += sizeof (ulong);
 
-	if (crc32 (crc32 (0, (char *)&hdr, sizeof hdr), data, len) != crc)
+	if (crc32 (crc32 (0, (uchar *)&hdr, sizeof hdr), data, len) != crc)
 		return (0);
 
 	ep->ver = hdr.ver;
@@ -260,7 +260,7 @@
 	char *eval;
 	ulong lval;
 
-	lval = simple_strtol (val, &eval, 10);
+	lval = simple_strtol ((char *)val, &eval, 10);
 
 	if ((uchar *)eval == val || *eval != '\0') {
 		printf ("%s rec (%s) is not a valid uint\n", rp->name, val);
@@ -315,12 +315,12 @@
 date_handler (eerec_map_t *rp, uchar *val, uchar *dp, uchar *edp)
 {
 	hymod_date_t date;
-	uchar *p = val;
+	char *p = (char *)val;
 	char *ep;
 	ulong lval;
 
 	lval = simple_strtol (p, &ep, 10);
-	if ((uchar *)ep == p || *ep++ != '-') {
+	if (ep == p || *ep++ != '-') {
 bad_date:
 		printf ("%s rec (%s) is not a valid date\n", rp->name, val);
 		return (NULL);
@@ -330,12 +330,12 @@
 	date.year = lval;
 
 	lval = simple_strtol (p = ep, &ep, 10);
-	if ((uchar *)ep == p || *ep++ != '-' || lval == 0 || lval > 12)
+	if (ep == p || *ep++ != '-' || lval == 0 || lval > 12)
 		goto bad_date;
 	date.month = lval;
 
 	lval = simple_strtol (p = ep, &ep, 10);
-	if ((uchar *)ep == p || *ep != '\0' || lval == 0 || lval > 31)
+	if (ep == p || *ep != '\0' || lval == 0 || lval > 31)
 		goto bad_date;
 	date.day = lval;
 
@@ -359,7 +359,7 @@
 {
 	uint len;
 
-	if ((len = strlen (val)) > rp->maxlen) {
+	if ((len = strlen ((char *)val)) > rp->maxlen) {
 		printf ("%s rec (%s) string is too long (%d>%d)\n",
 			rp->name, val, len, rp->maxlen);
 		return (NULL);
@@ -387,7 +387,7 @@
 	for (nbytes = 0, p = val; *p != '\0'; p = (uchar *)ep) {
 		ulong lval;
 
-		lval = simple_strtol (p, &ep, 10);
+		lval = simple_strtol ((char *)p, &ep, 10);
 		if ((uchar *)ep == p || (*ep != '\0' && *ep != ',') || \
 		    lval >= 256) {
 			printf ("%s rec (%s) byte array has invalid uint\n",
@@ -451,7 +451,7 @@
 	eerec_map_t *rp;
 
 	for (rp = eerec_map; rp < &eerec_map[neerecs]; rp++)
-		if (strcmp (name, rp->name) == 0)
+		if (strcmp ((char *)name, rp->name) == 0)
 			break;
 
 	if (rp >= &eerec_map[neerecs])
diff --git a/board/hymod/env.c b/board/hymod/env.c
index f58aec2..f9e1421 100644
--- a/board/hymod/env.c
+++ b/board/hymod/env.c
@@ -38,7 +38,7 @@
 	char ov[CFG_CBSIZE], nv[CFG_CBSIZE], *p, *q, *nn, c, *curver, *newver;
 	int override = 1, append = 0, remove = 0, nnl, ovl, nvl;
 
-	nn = name;
+	nn = (char *)name;
 
 	if (*nn == '-') {
 		override = 0;
@@ -68,7 +68,7 @@
 		return (0);
 	}
 
-	p = value;
+	p = (char *)value;
 	q = nv;
 
 	while ((c = *p) == ' ' || c == '\t')
diff --git a/board/icecube/flash.c b/board/icecube/flash.c
index 4ae71e6..713011c 100644
--- a/board/icecube/flash.c
+++ b/board/icecube/flash.c
@@ -139,7 +139,7 @@
 	int i;
 	uchar *boottype;
 	uchar *bootletter;
-	uchar *fmt;
+	char *fmt;
 	uchar botbootletter[] = "B";
 	uchar topbootletter[] = "T";
 	uchar botboottype[] = "bottom boot sector";
diff --git a/board/icecube/icecube.c b/board/icecube/icecube.c
index 7c9a92a..1f1a74c 100644
--- a/board/icecube/icecube.c
+++ b/board/icecube/icecube.c
@@ -107,9 +107,9 @@
 
 	/* find RAM size using SDRAM CS0 only */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	if (test1 > test2) {
 		sdram_start(0);
 		dramsize = test1;
@@ -135,10 +135,10 @@
 	/* find RAM size using SDRAM CS1 only */
 	if (!dramsize)
 		sdram_start(0);
-	test2 = test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+	test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 	if (!dramsize) {
 		sdram_start(1);
-		test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+		test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 	}
 	if (test1 > test2) {
 		sdram_start(0);
@@ -207,9 +207,9 @@
 
 	/* find RAM size */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	if (test1 > test2) {
 		sdram_start(0);
 		dramsize = test1;
diff --git a/board/icu862/flash.c b/board/icu862/flash.c
index 6315bd9..ca5bcf3 100644
--- a/board/icu862/flash.c
+++ b/board/icu862/flash.c
@@ -251,7 +251,7 @@
 
 	value = addr[1];			/* device ID		*/
 
-	switch (value) {
+	switch ((unsigned long)value) {
 	case AMD_ID_F040B:
 		info->flash_id += FLASH_AM040;
 		info->sector_count = 8;
diff --git a/board/icu862/icu862.c b/board/icu862/icu862.c
index b41ebae..8da9d1c 100644
--- a/board/icu862/icu862.c
+++ b/board/icu862/icu862.c
@@ -143,7 +143,7 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE1_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE1_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	udelay (1000);
@@ -151,7 +151,7 @@
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE1_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE1_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
diff --git a/board/ip860/ip860.c b/board/ip860/ip860.c
index 5b634e4..9dd809b 100644
--- a/board/ip860/ip860.c
+++ b/board/ip860/ip860.c
@@ -114,10 +114,10 @@
 
 	puts ("Board: ");
 
-	i = getenv_r ("serial#", buf, sizeof (buf));
+	i = getenv_r ("serial#", (char *)buf, sizeof (buf));
 	s = (i > 0) ? buf : NULL;
 
-	if (!s || strncmp (s, "IP860", 5)) {
+	if (!s || strncmp ((char *)s, "IP860", 5)) {
 		puts ("### No HW ID - assuming IP860");
 	} else {
 		for (e = s; *e; ++e) {
@@ -190,9 +190,9 @@
 	 * Check SDRAM Memory Size
 	 */
 	if (ip860_get_dram_size() == 16)
-		size = dram_size (refresh_val | 0x00804114, (ulong *)SDRAM_BASE, SDRAM_MAX_SIZE);
+		size = dram_size (refresh_val | 0x00804114, SDRAM_BASE, SDRAM_MAX_SIZE);
 	else
-		size = dram_size (refresh_val | 0x00906114, (ulong *)SDRAM_BASE, SDRAM_MAX_SIZE);
+		size = dram_size (refresh_val | 0x00906114, SDRAM_BASE, SDRAM_MAX_SIZE);
 
 	udelay (1000);
 
diff --git a/board/iphase4539/iphase4539.c b/board/iphase4539/iphase4539.c
index e50250e..0ca9cf5 100644
--- a/board/iphase4539/iphase4539.c
+++ b/board/iphase4539/iphase4539.c
@@ -342,7 +342,7 @@
 {
 	int sn = -1;
 
-	if (!seeprom_read (0xa0, (char *) &sn, sizeof (sn))) {
+	if (!seeprom_read (0xa0, (uchar *) &sn, sizeof (sn))) {
 		sn = cpu_to_le32 (sn);
 	}
 	return sn;
@@ -351,7 +351,7 @@
 {
 	char mac[6];
 
-	if (!seeprom_read (0xb0, mac, sizeof (mac))) {
+	if (!seeprom_read (0xb0, (uchar *)mac, sizeof (mac))) {
 		sprintf (str, "%02x:%02x:%02x:%02x:%02x:%02x\n",
 				 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 	} else {
diff --git a/board/ispan/ispan.c b/board/ispan/ispan.c
index fd34899..d39b8cd 100644
--- a/board/ispan/ispan.c
+++ b/board/ispan/ispan.c
@@ -290,7 +290,7 @@
 {
 	int sn = -1;
 
-	if (!seeprom_read (0xa0, (char *) &sn, sizeof (sn))) {
+	if (!seeprom_read (0xa0, (uchar *) &sn, sizeof (sn))) {
 		sn = cpu_to_le32 (sn);
 	}
 	return sn;
@@ -300,7 +300,7 @@
 {
 	char mac[6];
 
-	if (!seeprom_read (0xb0, mac, sizeof (mac))) {
+	if (!seeprom_read (0xb0, (uchar *)mac, sizeof (mac))) {
 		sprintf (str, "%02X:%02X:%02X:%02X:%02X:%02X",
 				 mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 	} else {
diff --git a/board/ivm/ivm.c b/board/ivm/ivm.c
index cb661c9..7927ea9 100644
--- a/board/ivm/ivm.c
+++ b/board/ivm/ivm.c
@@ -251,7 +251,7 @@
 	 * Check Bank 0 Memory Size for re-configuration
 	 */
 	size_b0 =
-		dram_size (CFG_MBMR_8COL, (ulong *) SDRAM_BASE3_PRELIM,
+		dram_size (CFG_MBMR_8COL, (long *) SDRAM_BASE3_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	memctl->memc_mbmr = CFG_MBMR_8COL | MBMR_PTBE;
diff --git a/board/kup/common/load_sernum_ethaddr.c b/board/kup/common/load_sernum_ethaddr.c
index 39ee124..b7b7499 100644
--- a/board/kup/common/load_sernum_ethaddr.c
+++ b/board/kup/common/load_sernum_ethaddr.c
@@ -54,9 +54,9 @@
 void load_sernum_ethaddr (void)
 {
 	unsigned char *hwi;
-	unsigned char *var;
+	char *var;
 	unsigned char hwi_stack[CFG_HWINFO_SIZE];
-	unsigned char *p;
+	char *p;
 
 	hwi = (unsigned char *) (CFG_FLASH_BASE + CFG_HWINFO_OFFSET);
 	if (*((unsigned long *) hwi) != (unsigned long) CFG_HWINFO_MAGIC) {
@@ -68,11 +68,11 @@
 	/*
 	 ** ethaddr
 	 */
-	var = strstr (hwi_stack, ETHADDR_TOKEN);
+	var = strstr ((char *)hwi_stack, ETHADDR_TOKEN);
 	if (var) {
 		var += sizeof (ETHADDR_TOKEN) - 1;
 		p = strchr (var, '\r');
-		if (p < hwi + CFG_HWINFO_SIZE) {
+		if ((unsigned char *)p < hwi + CFG_HWINFO_SIZE) {
 			*p = '\0';
 			setenv ("ethaddr", var);
 			*p = '\r';
@@ -81,11 +81,11 @@
 	/*
 	 ** lcd
 	 */
-	var = strstr (hwi_stack, LCD_TOKEN);
+	var = strstr ((char *)hwi_stack, LCD_TOKEN);
 	if (var) {
 		var += sizeof (LCD_TOKEN) - 1;
 		p = strchr (var, '\r');
-		if (p < hwi + CFG_HWINFO_SIZE) {
+		if ((unsigned char *)p < hwi + CFG_HWINFO_SIZE) {
 			*p = '\0';
 			setenv ("lcd", var);
 			*p = '\r';
diff --git a/board/kup/kup4k/kup4k.c b/board/kup/kup4k/kup4k.c
index c352c8b..e621c43 100644
--- a/board/kup/kup4k/kup4k.c
+++ b/board/kup/kup4k/kup4k.c
@@ -327,7 +327,7 @@
 	int r = 8, g = 8, b = 4;
 	int r1, g1, b1;
 	int n;
-	uchar tmp[64];		/* long enough for environment variables */
+	char tmp[64];		/* long enough for environment variables */
 	int tft = 0;
 
 	immr->im_cpm.cp_pbpar &= ~(PB_LCD_PWM);
@@ -453,7 +453,7 @@
 	}
 
 	/* copy bitmap */
-	fb = (char *) (fb_info.VmemAddr);
+	fb = (uchar *) (fb_info.VmemAddr);
 	memcpy (fb, (uchar *) CONFIG_KUP4K_LOGO, 320 * 240);
 }
 #endif	/* CONFIG_KUP4K_LOGO */
diff --git a/board/lantec/lantec.c b/board/lantec/lantec.c
index aa96a16..417dbbb 100644
--- a/board/lantec/lantec.c
+++ b/board/lantec/lantec.c
@@ -171,7 +171,7 @@
 	 * Check Bank 0 Memory Size for re-configuration
 	 */
 	size_b0 = dram_size (CFG_MAMR_8COL,
-			     (ulong *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
+			     (long *) SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
 
 	memctl->memc_mamr = CFG_MAMR_8COL | MAMR_PTAE;
 
diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c
index 7cf5778..a174b57 100644
--- a/board/lwmon/lwmon.c
+++ b/board/lwmon/lwmon.c
@@ -266,14 +266,14 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
+	size8 = dram_size (CFG_MAMR_8COL, (long *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
 
 	udelay (1000);
 
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
+	size9 = dram_size (CFG_MAMR_9COL, (long *)SDRAM_BASE3_PRELIM, SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
 		size_b0 = size9;
@@ -574,11 +574,11 @@
 	DECLARE_GLOBAL_DATA_PTR;
 
 	uchar kbd_data[KEYBD_DATALEN];
-	uchar keybd_env[2 * KEYBD_DATALEN + 1];
+	char keybd_env[2 * KEYBD_DATALEN + 1];
 	uchar kbd_init_status = gd->kbd_status >> 8;
 	uchar kbd_status = gd->kbd_status;
 	uchar val;
-	uchar *str;
+	char *str;
 	int i;
 
 	if (kbd_init_status) {
@@ -617,7 +617,7 @@
 	}
 	setenv ("keybd", keybd_env);
 
-	str = strdup (key_match (kbd_data));	/* decode keys */
+	str = strdup ((char *)key_match (kbd_data));	/* decode keys */
 #ifdef KEYBD_SET_DEBUGMODE
 	if (kbd_data[0] == KEYBD_SET_DEBUGMODE) {	/* set debug mode */
 		if ((console_assign (stdout, "lcd") < 0) ||
@@ -649,11 +649,11 @@
 	/* Don't include modifier byte */
 	memcpy (compare, kbd_data+1, KEYBD_DATALEN-1);
 
-	for (; str != NULL; str = (*nxt) ? nxt+1 : nxt) {
+	for (; str != NULL; str = (*nxt) ? (uchar *)(nxt+1) : (uchar *)nxt) {
 		uchar c;
 		int k;
 
-		c = (uchar) simple_strtoul (str, (char **) (&nxt), 16);
+		c = (uchar) simple_strtoul ((char *)str, (char **) (&nxt), 16);
 
 		if (str == (uchar *)nxt) {	/* invalid character */
 			break;
@@ -719,9 +719,9 @@
  ***********************************************************************/
 static uchar *key_match (uchar *kbd_data)
 {
-	uchar magic[sizeof (kbd_magic_prefix) + 1];
+	char magic[sizeof (kbd_magic_prefix) + 1];
 	uchar *suffix;
-	uchar *kbd_magic_keys;
+	char *kbd_magic_keys;
 
 	/*
 	 * The following string defines the characters that can pe appended
@@ -737,13 +737,13 @@
 	/* loop over all magic keys;
 	 * use '\0' suffix in case of empty string
 	 */
-	for (suffix=kbd_magic_keys; *suffix || suffix==kbd_magic_keys; ++suffix) {
+	for (suffix=(uchar *)kbd_magic_keys; *suffix || suffix==(uchar *)kbd_magic_keys; ++suffix) {
 		sprintf (magic, "%s%c", kbd_magic_prefix, *suffix);
 #if 0
 		printf ("### Check magic \"%s\"\n", magic);
 #endif
-		if (compare_magic(kbd_data, getenv(magic)) == 0) {
-			uchar cmd_name[sizeof (kbd_command_prefix) + 1];
+		if (compare_magic(kbd_data, (uchar *)getenv(magic)) == 0) {
+			char cmd_name[sizeof (kbd_command_prefix) + 1];
 			char *cmd;
 
 			sprintf (cmd_name, "%s%c", kbd_command_prefix, *suffix);
@@ -754,7 +754,7 @@
 					cmd_name, cmd ? cmd : "<<NULL>>");
 #endif
 			*kbd_data = *suffix;
-			return (cmd);
+			return ((uchar *)cmd);
 		}
 	}
 #if 0
@@ -863,7 +863,7 @@
 int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	uchar kbd_data[KEYBD_DATALEN];
-	uchar keybd_env[2 * KEYBD_DATALEN + 1];
+	char keybd_env[2 * KEYBD_DATALEN + 1];
 	uchar val;
 	int i;
 
@@ -1044,7 +1044,7 @@
 	i2c_write (kbd_addr, 0, 0, &val, 1);
 	i2c_read (kbd_addr, 0, 0, kbd_data, KEYBD_DATALEN);
 
-	return (compare_magic(kbd_data, CONFIG_MODEM_KEY_MAGIC) == 0);
+	return (compare_magic(kbd_data, (uchar *)CONFIG_MODEM_KEY_MAGIC) == 0);
 }
 #endif	/* CONFIG_MODEM_SUPPORT */
 
@@ -1063,6 +1063,6 @@
 	i2c_write (kbd_addr, 0, 0, &val, 1);
 	i2c_read (kbd_addr, 0, 0, kbd_data, KEYBD_DATALEN);
 
-	return (compare_magic(kbd_data, CONFIG_POST_KEY_MAGIC) == 0);
+	return (compare_magic(kbd_data, (uchar *)CONFIG_POST_KEY_MAGIC) == 0);
 }
 #endif
diff --git a/board/ml2/flash.c b/board/ml2/flash.c
index 4f805a6..87cb1ff 100644
--- a/board/ml2/flash.c
+++ b/board/ml2/flash.c
@@ -216,7 +216,7 @@
 	return rc;
 }
 
-volatile static int write_word (flash_info_t *info, ulong dest, unsigned long long data) {
+static int write_word (flash_info_t *info, ulong dest, unsigned long long data) {
 
 	volatile unsigned long long *addr=(unsigned long long *)dest;
 	unsigned long long result;
diff --git a/board/ml2/ml2.c b/board/ml2/ml2.c
index ff5f816..f32e512 100644
--- a/board/ml2/ml2.c
+++ b/board/ml2/ml2.c
@@ -30,8 +30,8 @@
 
 int checkboard (void)
 {
-	unsigned char *s = getenv ("serial#");
-	unsigned char *e;
+	char *s = getenv ("serial#");
+	char *e;
 
 	if (!s || strncmp (s, "ML2", 9)) {
 		printf ("### No HW ID - assuming ML2");
diff --git a/board/mpl/common/common_util.c b/board/mpl/common/common_util.c
index e14bcca..b331d6e 100644
--- a/board/mpl/common/common_util.c
+++ b/board/mpl/common/common_util.c
@@ -163,7 +163,7 @@
 #endif
 	printf("flash erased, programming from 0x%lx 0x%lx Bytes\n",
 		(ulong)src, size);
-	if ((rc = flash_write (src, start, size)) != 0) {
+	if ((rc = flash_write ((char *)src, start, size)) != 0) {
 		puts("ERROR ");
 		flash_perror(rc);
 		return (1);
@@ -200,14 +200,14 @@
 	len  = sizeof(image_header_t);
 	checksum = ntohl(hdr->ih_hcrc);
 	hdr->ih_hcrc = 0;
-	if (crc32 (0, (char *)data, len) != checksum) {
+	if (crc32 (0, (uchar *)data, len) != checksum) {
 		puts("Bad Header Checksum\n");
 		return 1;
 	}
 	data = ld_addr + sizeof(image_header_t);
 	len  = ntohl(hdr->ih_size);
 	puts("Verifying Checksum ... ");
-	if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
+	if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {
 		puts("Bad Data CRC\n");
 		return 1;
 	}
@@ -376,8 +376,8 @@
 			} while(len > off);
 			name=&name_buf[0];
 			value=&value_buf[0];
-			if(strncmp(name,"baudrate",8)!=0) {
-				setenv(name,value);
+			if(strncmp((char *)name,"baudrate",8)!=0) {
+				setenv((char *)name,(char *)value);
 			}
 
 		}
@@ -387,7 +387,7 @@
 
 void check_env(void)
 {
-	unsigned char *s;
+	char *s;
 	int i=0;
 	char buf[32];
 	backup_t back;
@@ -592,7 +592,7 @@
 	char buf[64];
 	char tmp[16];
 	char cpustr[16];
-	unsigned char *s, *e, bc;
+	char *s, *e, bc;
 	switch (line_number)
 	{
 	case 2:
diff --git a/board/mpl/common/isa.c b/board/mpl/common/isa.c
index 793c34f..51b2773 100644
--- a/board/mpl/common/isa.c
+++ b/board/mpl/common/isa.c
@@ -155,7 +155,7 @@
 
 void isa_sio_loadtable(void)
 {
-	unsigned char *s = getenv("floppy");
+	char *s = getenv("floppy");
 	/* setup Floppy device 0*/
 	isa_write_table((SIO_LOGDEV_TABLE *)&sio_fdc,0);
 	/* setup parallel port device 3 */
diff --git a/board/mpl/mip405/mip405.c b/board/mpl/mip405/mip405.c
index b1adde6..84d3e1e 100644
--- a/board/mpl/mip405/mip405.c
+++ b/board/mpl/mip405/mip405.c
@@ -585,15 +585,15 @@
 
 int checkboard (void)
 {
-	unsigned char s[50];
+	char s[50];
 	unsigned char bc, var;
 	int i;
 	backup_t *b = (backup_t *) s;
 
 	puts ("Board: ");
 	get_pcbrev_var(&bc,&var);
-	i = getenv_r ("serial#", s, 32);
-	if ((i == 0) || strncmp (s, BOARD_NAME,sizeof(BOARD_NAME))) {
+	i = getenv_r ("serial#", (char *)s, 32);
+	if ((i == 0) || strncmp ((char *)s, BOARD_NAME,sizeof(BOARD_NAME))) {
 		get_backup_values (b);
 		if (strncmp (b->signature, "MPL\0", 4) != 0) {
 			puts ("### No HW ID - assuming " BOARD_NAME);
@@ -728,7 +728,7 @@
 {
 	unsigned long stop;
 	struct rtc_time newtm;
-	unsigned char *s;
+	char *s;
 	mem_test_reloc();
 	/* write correct LED configuration */
 	if (miiphy_write (0x1, 0x14, 0x2402) != 0) {
diff --git a/board/mpl/pip405/pip405.c b/board/mpl/pip405/pip405.c
index 590bd20..a398362 100644
--- a/board/mpl/pip405/pip405.c
+++ b/board/mpl/pip405/pip405.c
@@ -180,7 +180,7 @@
 {
 	unsigned char dataout[1];
 	unsigned char datain[128];
-	unsigned long sdram_size;
+	unsigned long sdram_size = 0;
 	SDRAM_SETUP *t = (SDRAM_SETUP *) sdram_setup_table;
 	unsigned long memclk;
 	unsigned long tmemclk = 0;
@@ -574,15 +574,15 @@
 
 int checkboard (void)
 {
-	unsigned char s[50];
+	char s[50];
 	unsigned char bc;
 	int i;
 	backup_t *b = (backup_t *) s;
 
 	puts ("Board: ");
 
-	i = getenv_r ("serial#", s, 32);
-	if ((i == 0) || strncmp (s, "PIP405", 6)) {
+	i = getenv_r ("serial#", (char *)s, 32);
+	if ((i == 0) || strncmp ((char *)s, "PIP405", 6)) {
 		get_backup_values (b);
 		if (strncmp (b->signature, "MPL\0", 4) != 0) {
 			puts ("### No HW ID - assuming PIP405");
diff --git a/board/mvs1/mvs1.c b/board/mvs1/mvs1.c
index fb7547f..f8a8cb7 100644
--- a/board/mvs1/mvs1.c
+++ b/board/mvs1/mvs1.c
@@ -197,14 +197,14 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	udelay (1000);
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
diff --git a/board/nx823/nx823.c b/board/nx823/nx823.c
index cbcbab8..65d45c1 100644
--- a/board/nx823/nx823.c
+++ b/board/nx823/nx823.c
@@ -221,7 +221,7 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE1_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE1_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	udelay (1000);
@@ -229,7 +229,7 @@
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE1_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE1_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {	/* leave configuration at 9 columns     */
@@ -248,7 +248,7 @@
 	 * [9 column SDRAM may also be used in 8 column mode,
 	 *  but then only half the real size will be used.]
 	 */
-	size_b1 = dram_size (memctl->memc_mamr, (ulong *) SDRAM_BASE2_PRELIM,
+	size_b1 = dram_size (memctl->memc_mamr, (long *) SDRAM_BASE2_PRELIM,
 			     SDRAM_MAX_SIZE);
 /*	debug ("SDRAM Bank 1: %ld MB\n", size8 >> 20);	*/
 
diff --git a/board/o2dnt/flash.c b/board/o2dnt/flash.c
index dbb49f7..037d287 100644
--- a/board/o2dnt/flash.c
+++ b/board/o2dnt/flash.c
@@ -154,7 +154,7 @@
 	int i;
 	uchar *boottype;
 	uchar *bootletter;
-	uchar *fmt;
+	char *fmt;
 	uchar botbootletter[] = "B";
 	uchar topbootletter[] = "T";
 	uchar botboottype[] = "bottom boot sector";
diff --git a/board/o2dnt/o2dnt.c b/board/o2dnt/o2dnt.c
index 8c6f5db..81a2700 100644
--- a/board/o2dnt/o2dnt.c
+++ b/board/o2dnt/o2dnt.c
@@ -85,9 +85,9 @@
 
 	/* find RAM size using SDRAM CS0 only */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	if (test1 > test2) {
 		sdram_start(0);
 		dramsize = test1;
@@ -113,11 +113,11 @@
 	if (!dramsize)
 		sdram_start(0);
 
-	test2 = test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+	test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 
 	if (!dramsize) {
 		sdram_start(1);
-		test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+		test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 	}
 
 	if (test1 > test2) {
diff --git a/board/pcippc2/flash.c b/board/pcippc2/flash.c
index 6e9e339..8c01415 100644
--- a/board/pcippc2/flash.c
+++ b/board/pcippc2/flash.c
@@ -136,7 +136,7 @@
 
 	DEBUGF("Device ID @ 0x%08lx: 0x%08x\n", addr+1, value);
 
-	switch (value) {
+	switch ((ulong)value) {
 		case AMD_ID_F040B:
 			DEBUGF("Am29F040B\n");
 			info->flash_id += FLASH_AM040;
diff --git a/board/pm520/pm520.c b/board/pm520/pm520.c
index 619df59..d4cc5cb 100644
--- a/board/pm520/pm520.c
+++ b/board/pm520/pm520.c
@@ -107,9 +107,9 @@
 
 	/* find RAM size using SDRAM CS0 only */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	if (test1 > test2) {
 		sdram_start(0);
 		dramsize = test1;
@@ -135,10 +135,10 @@
 	/* find RAM size using SDRAM CS1 only */
 	if (!dramsize)
 		sdram_start(0);
-	test2 = test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+	test2 = test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 	if (!dramsize) {
 		sdram_start(1);
-		test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+		test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 	}
 	if (test1 > test2) {
 		sdram_start(0);
diff --git a/board/pn62/pn62.c b/board/pn62/pn62.c
index 0252240..377aaa8 100644
--- a/board/pn62/pn62.c
+++ b/board/pn62/pn62.c
@@ -167,7 +167,7 @@
 	if (size < I2155X_VPD_SN_SIZE)
 		size = I2155X_VPD_SN_SIZE;
 	for (i = 0; i < (size - 1); i++) {
-		i2155x_read_vpd (I2155X_VPD_SN_START + i, 1, &c);
+		i2155x_read_vpd (I2155X_VPD_SN_START + i, 1, (uchar *)&c);
 		if (c == '\0')
 			break;
 		string[i] = c;
diff --git a/board/ppmc8260/ppmc8260.c b/board/ppmc8260/ppmc8260.c
index e92ad8f..2b20c26 100644
--- a/board/ppmc8260/ppmc8260.c
+++ b/board/ppmc8260/ppmc8260.c
@@ -285,7 +285,7 @@
 	int res;
 
 	if ((ds != 0) && (ds != 0xff)) {
-		res = getenv_r ("ethaddr", tmp, sizeof (tmp));
+		res = getenv_r ("ethaddr", (char *)tmp, sizeof (tmp));
 		if (res > 0) {
 			ss = ((ds >> 4) & 0x0f);
 			ss += ss < 0x0a ? '0' : ('a' - 10);
@@ -296,7 +296,7 @@
 			tmp[16] = ss;
 
 			tmp[17] = '\0';
-			setenv ("ethaddr", tmp);
+			setenv ("ethaddr", (char *)tmp);
 			/* set the led to show the address */
 			*((unsigned char *) (CFG_LED_BASE + 1)) = ds;
 		}
diff --git a/board/quantum/quantum.c b/board/quantum/quantum.c
index 8a73448..2861bc3 100644
--- a/board/quantum/quantum.c
+++ b/board/quantum/quantum.c
@@ -87,7 +87,7 @@
 
 int checkboard (void)
 {
-	unsigned char *s = getenv ("serial#");
+	char *s = getenv ("serial#");
 
 	puts ("Board QUANTUM, Serial No: ");
 
@@ -136,7 +136,7 @@
 	/* Check Bank 0 Memory Size,
 	 * 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE_PRELIM,
 			   SDRAM_MAX_SIZE);
 	/*
 	 * Final mapping:
@@ -162,7 +162,7 @@
 {
 	volatile immap_t *immap = (immap_t *) CFG_IMMR;
 	volatile memctl8xx_t *memctl = &immap->im_memctl;
-	volatile long int *addr;
+	volatile ulong *addr;
 	ulong cnt, val, size;
 	ulong save[32];		/* to make test non-destructive */
 	unsigned char i = 0;
diff --git a/board/r360mpi/r360mpi.c b/board/r360mpi/r360mpi.c
index 8ca08e2..ffb4c0e 100644
--- a/board/r360mpi/r360mpi.c
+++ b/board/r360mpi/r360mpi.c
@@ -152,7 +152,7 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	udelay (1000);
@@ -160,7 +160,7 @@
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {		/* leave configuration at 9 columns */
@@ -287,21 +287,21 @@
 
 int misc_init_r (void)
 {
-	uchar kbd_data[KEYBD_DATALEN];
-	uchar keybd_env[2 * KEYBD_DATALEN + 1];
-	uchar *str;
+	char kbd_data[KEYBD_DATALEN];
+	char keybd_env[2 * KEYBD_DATALEN + 1];
+	char *str;
 	int i;
 
 	i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE);
 
-	i2c_read (CFG_I2C_KEY_ADDR, 0, 0, kbd_data, KEYBD_DATALEN);
+	i2c_read (CFG_I2C_KEY_ADDR, 0, 0, (uchar *)kbd_data, KEYBD_DATALEN);
 
 	for (i = 0; i < KEYBD_DATALEN; ++i) {
 		sprintf (keybd_env + i + i, "%02X", kbd_data[i]);
 	}
 	setenv ("keybd", keybd_env);
 
-	str = strdup (key_match (keybd_env));	/* decode keys */
+	str = strdup ((char *)key_match ((uchar *)keybd_env));	/* decode keys */
 
 #ifdef CONFIG_PREBOOT	/* automatically configure "preboot" command on key match */
 	setenv ("preboot", str);	/* set or delete definition */
@@ -347,36 +347,36 @@
 	 * "key_magic" is checked (old behaviour); the string "125" causes
 	 * checks for "key_magic1", "key_magic2" and "key_magic5", etc.
 	 */
-	if ((kbd_magic_keys = getenv ("magic_keys")) != NULL) {
+	if ((kbd_magic_keys = (uchar *)getenv ("magic_keys")) != NULL) {
 		/* loop over all magic keys;
 		 * use '\0' suffix in case of empty string
 		 */
 		for (suffix = kbd_magic_keys;
 		     *suffix || suffix == kbd_magic_keys;
 		     ++suffix) {
-			sprintf (magic, "%s%c", kbd_magic_prefix, *suffix);
+			sprintf ((char *)magic, "%s%c", kbd_magic_prefix, *suffix);
 
 #if 0
 			printf ("### Check magic \"%s\"\n", magic);
 #endif
 
-			if ((str = getenv (magic)) != 0) {
+			if ((str = (uchar *)getenv ((char *)magic)) != 0) {
 
 #if 0
 				printf ("### Compare \"%s\" \"%s\"\n",
 					kbd_str, str);
 #endif
-				if (strcmp (kbd_str, str) == 0) {
-					sprintf (cmd_name, "%s%c",
+				if (strcmp ((char *)kbd_str, (char *)str) == 0) {
+					sprintf ((char *)cmd_name, "%s%c",
 						 kbd_command_prefix,
 						 *suffix);
 
-					if ((cmd = getenv (cmd_name)) != 0) {
+					if ((cmd = getenv ((char *)cmd_name)) != 0) {
 #if 0
 						printf ("### Set PREBOOT to $(%s): \"%s\"\n",
 							cmd_name, cmd);
 #endif
-						return (cmd);
+						return ((uchar *)cmd);
 					}
 				}
 			}
@@ -404,11 +404,11 @@
 
 	puts ("Keys:");
 	for (i = 0; i < KEYBD_DATALEN; ++i) {
-		sprintf (keybd_env + i + i, "%02X", kbd_data[i]);
+		sprintf ((char *)(keybd_env + i + i), "%02X", kbd_data[i]);
 		printf (" %02x", kbd_data[i]);
 	}
 	putc ('\n');
-	setenv ("keybd", keybd_env);
+	setenv ("keybd", (char *)keybd_env);
 	return 0;
 }
 
diff --git a/board/rbc823/flash.c b/board/rbc823/flash.c
index f12d0be..84ae5c1 100644
--- a/board/rbc823/flash.c
+++ b/board/rbc823/flash.c
@@ -188,12 +188,11 @@
 #endif
 	switch (value)
 	{
-		case 0x01:
-		case AMD_MANUFACT:
+		case 0x01: /*AMD_MANUFACT*/
 			info->flash_id = FLASH_MAN_AMD;
 		break;
 
-		case FUJ_MANUFACT:
+		case 0x04: /*FUJ_MANUFACT*/
 			info->flash_id = FLASH_MAN_FUJ;
 		break;
 
diff --git a/board/rbc823/rbc823.c b/board/rbc823/rbc823.c
index d0ceb4a..9e60c2b 100644
--- a/board/rbc823/rbc823.c
+++ b/board/rbc823/rbc823.c
@@ -127,7 +127,7 @@
 
 int checkboard (void)
 {
-	unsigned char *s = getenv ("serial#");
+	char *s = getenv ("serial#");
 
 	if (!s || strncmp (s, "TQM8", 4)) {
 		printf ("### No HW ID - assuming RBC823\n");
@@ -193,14 +193,14 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE4_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, (long *) SDRAM_BASE4_PRELIM,
 			   SDRAM_MAX_SIZE);
 	udelay (1000);
 
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE4_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE4_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	if (size8 < size9) {	/* leave configuration at 9 columns     */
diff --git a/board/rmu/rmu.c b/board/rmu/rmu.c
index cf00efc..8cb03c7 100644
--- a/board/rmu/rmu.c
+++ b/board/rmu/rmu.c
@@ -127,7 +127,7 @@
 	 * 9 column mode
 	 */
 
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, (long *) SDRAM_BASE_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	/*
diff --git a/board/sandburst/common/ppc440gx_i2c.c b/board/sandburst/common/ppc440gx_i2c.c
index 858b38c..859dd7a 100644
--- a/board/sandburst/common/ppc440gx_i2c.c
+++ b/board/sandburst/common/ppc440gx_i2c.c
@@ -451,9 +451,9 @@
  */
 uchar i2c_reg_read1(uchar i2c_addr, uchar reg)
 {
-	char buf;
+	uchar buf;
 
-	i2c_read1(i2c_addr, reg, 1, &buf, 1);
+	i2c_read1(i2c_addr, reg, 1, &buf, (uchar)1);
 
 	return(buf);
 }
diff --git a/board/sandburst/karef/karef.h b/board/sandburst/karef/karef.h
index 7790819..5de7cb5 100644
--- a/board/sandburst/karef/karef.h
+++ b/board/sandburst/karef/karef.h
@@ -57,7 +57,7 @@
     volatile unsigned long brdout_enable_ul;  /* Read/Write */
     volatile unsigned long brdin_data_ul;     /* Read Only  */
     volatile unsigned long misc_ul;           /* Read/Write */
-} KAREF_FPGA_REGS_ST __attribute__((packed)), * KAREF_FPGA_REGS_PST;
+} __attribute__((packed)) KAREF_FPGA_REGS_ST , * KAREF_FPGA_REGS_PST;
 
 /* OFEM FPGA */
 typedef struct ofem_fpga_regs_s
@@ -70,7 +70,7 @@
     volatile unsigned long scrmask_ul;        /* Read/Write */
     volatile unsigned long control_ul;        /* Read/Write */
     volatile unsigned long mac_flow_ctrl_ul;  /* Read/Write */
-} OFEM_FPGA_REGS_ST __attribute__((packed)), * OFEM_FPGA_REGS_PST;
+} __attribute__((packed)) OFEM_FPGA_REGS_ST , * OFEM_FPGA_REGS_PST;
 
 
 #endif /* __KAREF_H__ */
diff --git a/board/sandburst/metrobox/metrobox.h b/board/sandburst/metrobox/metrobox.h
index cb7a83c..3f28f00 100644
--- a/board/sandburst/metrobox/metrobox.h
+++ b/board/sandburst/metrobox/metrobox.h
@@ -40,6 +40,6 @@
 	volatile unsigned long scrmask_ul;	/* Read/Write */
 	volatile unsigned long control_ul;	/* Read/Write */
 	volatile unsigned long boardinfo_ul;	/* Read Only  */
-} OPTO_FPGA_REGS_ST __attribute__ ((packed)), *OPTO_FPGA_REGS_PST;
+} __attribute__ ((packed)) OPTO_FPGA_REGS_ST , *OPTO_FPGA_REGS_PST;
 
 #endif /* __METROBOX_H__ */
diff --git a/board/sbc405/sbc405.c b/board/sbc405/sbc405.c
index ef9bce1..cad5873 100644
--- a/board/sbc405/sbc405.c
+++ b/board/sbc405/sbc405.c
@@ -78,7 +78,7 @@
 
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/siemens/CCM/ccm.c b/board/siemens/CCM/ccm.c
index 3ed1b75..5a32e45 100644
--- a/board/siemens/CCM/ccm.c
+++ b/board/siemens/CCM/ccm.c
@@ -102,7 +102,7 @@
     unsigned char *s;
     unsigned char buf[64];
 
-    s = (getenv_r ("serial#", buf, sizeof(buf)) > 0) ? buf : NULL;
+    s = (getenv_r ("serial#", (char *)&buf, sizeof(buf)) > 0) ? buf : NULL;
 
     puts ("Board: Siemens CCM");
 
@@ -203,14 +203,14 @@
      *
      * try 8 column mode
      */
-    size8 = dram_size (CFG_MAMR_8COL, (ulong *)SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
+    size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
 
     udelay (1000);
 
     /*
      * try 9 column mode
      */
-    size9 = dram_size (CFG_MAMR_9COL, (ulong *)SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
+    size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
 
     if (size8 < size9) {		/* leave configuration at 9 columns	*/
 	size = size9;
diff --git a/board/siemens/IAD210/IAD210.c b/board/siemens/IAD210/IAD210.c
index 52cd4e6..e498937 100644
--- a/board/siemens/IAD210/IAD210.c
+++ b/board/siemens/IAD210/IAD210.c
@@ -155,7 +155,7 @@
 	 * Check Bank 0 Memory Size for re-configuration
 	 *
 	 */
-	size = dram_size (CFG_MAMR, (ulong *) SDRAM_BASE_PRELIM,
+	size = dram_size (CFG_MAMR, (long *) SDRAM_BASE_PRELIM,
 			  SDRAM_MAX_SIZE);
 
 	udelay (1000);
diff --git a/board/siemens/SCM/scm.c b/board/siemens/SCM/scm.c
index d832edf..d20688d 100644
--- a/board/siemens/SCM/scm.c
+++ b/board/siemens/SCM/scm.c
@@ -206,7 +206,7 @@
  */
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 
 	puts ("Board: ");
diff --git a/board/siemens/common/fpga.c b/board/siemens/common/fpga.c
index 169048e..e9941cd 100644
--- a/board/siemens/common/fpga.c
+++ b/board/siemens/common/fpga.c
@@ -169,7 +169,7 @@
 	}
     }
 
-    if (checkall && fpga_get_version(fpga, hdr.ih_name) < 0)
+    if (checkall && fpga_get_version(fpga, (char *)(hdr.ih_name)) < 0)
 	return 1;
 
     /* align length */
@@ -341,7 +341,7 @@
 	}
 
 	hdr = (image_header_t *)addr;
-	if ((new_id = fpga_get_version(fpga, hdr->ih_name)) == -1)
+	if ((new_id = fpga_get_version(fpga, (char *)(hdr->ih_name))) == -1)
 	    return 1;
 
 	do_load = 1;
diff --git a/board/siemens/pcu_e/pcu_e.c b/board/siemens/pcu_e/pcu_e.c
index 6374513..3f05e4a 100644
--- a/board/siemens/pcu_e/pcu_e.c
+++ b/board/siemens/pcu_e/pcu_e.c
@@ -241,9 +241,9 @@
 	 * Check Bank 0 Memory Size for re-configuration
 	 */
 #if PCU_E_WITH_SWAPPED_CS	/* XXX */
-	size_b0 = dram_size (CFG_MAMR, (ulong *) SDRAM_BASE5_PRELIM, SDRAM_MAX_SIZE);
+	size_b0 = dram_size (CFG_MAMR, (long *) SDRAM_BASE5_PRELIM, SDRAM_MAX_SIZE);
 #else  /* XXX */
-	size_b0 = dram_size (CFG_MAMR, (ulong *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
+	size_b0 = dram_size (CFG_MAMR, (long *) SDRAM_BASE2_PRELIM, SDRAM_MAX_SIZE);
 #endif /* XXX */
 
 	memctl->memc_mamr = CFG_MAMR | MAMR_PTAE;
diff --git a/board/sixnet/flash.c b/board/sixnet/flash.c
index 4ab6c1b..61d7580 100644
--- a/board/sixnet/flash.c
+++ b/board/sixnet/flash.c
@@ -196,7 +196,7 @@
 	int i;
 	uchar *boottype;
 	uchar *bootletter;
-	uchar *fmt;
+	char *fmt;
 	uchar botbootletter[] = "B";
 	uchar topbootletter[] = "T";
 	uchar botboottype[] = "bottom boot sector";
diff --git a/board/sixnet/sixnet.c b/board/sixnet/sixnet.c
index c31ea53..867589f 100644
--- a/board/sixnet/sixnet.c
+++ b/board/sixnet/sixnet.c
@@ -356,7 +356,7 @@
 static long ram_size(ulong *base, long maxsize)
 {
     volatile long	*test_addr;
-    volatile long	*base_addr = base;
+    volatile ulong	*base_addr = base;
     ulong		ofs;		/* byte offset from base_addr */
     ulong		save;		/* to make test non-destructive */
     ulong		save2;		/* to make test non-destructive */
diff --git a/board/snmc/qs850/qs850.c b/board/snmc/qs850/qs850.c
index 105eeb8..637f125 100644
--- a/board/snmc/qs850/qs850.c
+++ b/board/snmc/qs850/qs850.c
@@ -89,8 +89,8 @@
 
 int checkboard (void)
 {
-	unsigned char *s, *e;
-	unsigned char buf[64];
+	char *s, *e;
+	char buf[64];
 	int i;
 
 	i = getenv_r("serial#", buf, sizeof(buf));
@@ -192,7 +192,7 @@
 	* Check for 32M SDRAM Memory Size
 	*/
 	size = dram_size(CFG_32M_MAMR|MAMR_PTAE,
-	(ulong *)SDRAM_BASE, SDRAM_32M_MAX_SIZE);
+	(long *)SDRAM_BASE, SDRAM_32M_MAX_SIZE);
 	udelay (1000);
 
 	/*
@@ -200,7 +200,7 @@
 	*/
 	if (size != SDRAM_32M_MAX_SIZE) {
 	size = dram_size(CFG_16M_MAMR|MAMR_PTAE,
-	(ulong *)SDRAM_BASE, SDRAM_16M_MAX_SIZE);
+	(long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE);
 	udelay (1000);
 	}
 
diff --git a/board/snmc/qs860t/qs860t.c b/board/snmc/qs860t/qs860t.c
index 2a55157..a11d863 100644
--- a/board/snmc/qs860t/qs860t.c
+++ b/board/snmc/qs860t/qs860t.c
@@ -89,8 +89,8 @@
 
 int checkboard (void)
 {
-	unsigned char *s, *e;
-	unsigned char buf[64];
+	char *s, *e;
+	char buf[64];
 	int i;
 
 	i = getenv_r("serial#", buf, sizeof(buf));
@@ -163,7 +163,7 @@
 	*/
 	if (size != SDRAM_64M_MAX_SIZE) {
 #endif
-	size = dram_size (CFG_16M_MBMR, (ulong *)SDRAM_BASE, SDRAM_16M_MAX_SIZE);
+	size = dram_size (CFG_16M_MBMR, (long *)SDRAM_BASE, SDRAM_16M_MAX_SIZE);
 	udelay (1000);
 #if 0
 	}
diff --git a/board/spd8xx/spd8xx.c b/board/spd8xx/spd8xx.c
index 9f52e33..c79b9b0 100644
--- a/board/spd8xx/spd8xx.c
+++ b/board/spd8xx/spd8xx.c
@@ -205,7 +205,7 @@
 	 * Check Bank 0 Memory Size for re-configuration
 	 */
 	size_b0 =
-		dram_size (CFG_MBMR_8COL, (ulong *) SDRAM_BASE3_PRELIM,
+		dram_size (CFG_MBMR_8COL, SDRAM_BASE3_PRELIM,
 			   SDRAM_MAX_SIZE);
 
 	memctl->memc_mbmr = CFG_MBMR_8COL | MBMR_PTBE;
diff --git a/board/stxxtc/Makefile b/board/stxxtc/Makefile
index 8c529a0..11065cf 100644
--- a/board/stxxtc/Makefile
+++ b/board/stxxtc/Makefile
@@ -25,11 +25,19 @@
 
 LIB	= lib$(BOARD).a
 
-OBJS	= $(BOARD).o
+OBJS	= $(BOARD).o oftree.o
 
 $(LIB):	.depend $(OBJS)
 	$(AR) crv $@ $(OBJS)
 
+%.dtb: %.dts
+	dtc -f -V 0x10 -I dts -O dtb $< >$@
+
+%.c: %.dtb
+	xxd -i $< \
+	   | sed -e "s/^unsigned char/const unsigned char/g" \
+	   | sed -e "s/^unsigned int/const unsigned int/g" > $@
+
 #########################################################################
 
 .depend:	Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
diff --git a/board/stxxtc/oftree.dts b/board/stxxtc/oftree.dts
new file mode 100644
index 0000000..e3f3017
--- /dev/null
+++ b/board/stxxtc/oftree.dts
@@ -0,0 +1,52 @@
+/ {
+	model = "STXXTC V1";
+	compatible = "STXXTC";
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	cpus {
+		linux,phandle = <1>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		PowerPC,MPC870@0 {
+			linux,phandle = <3>;
+			name = "PowerPC,MPC870";
+			device_type = "cpu";
+			reg = <0>;
+			clock-frequency = <0>;		/* place-holder for runtime fillup */
+			timebase-frequency = <0>;	/* dido */
+			linux,boot-cpu;
+			i-cache-size = <2000>;
+			d-cache-size = <2000>;
+			32-bit;
+		};
+	};
+
+	memory@0 {
+		device_type = "memory";
+		reg = <00000000 00000000 00000000 20000000>;
+	};
+
+	/* copy of the bd_t information (place-holders) */
+	bd_t {
+		memstart	= <0>;
+		memsize		= <0>;
+		flashstart	= <0>;
+		flashsize	= <0>;
+		flashoffset	= <0>;
+		sramstart	= <0>;
+		sramsize	= <0>;
+
+		immr_base	= <0>;
+
+		bootflags	= <0>;
+		ip_addr		= <0>;
+		enetaddr	= [ 00 00 00 00 00 00 ];
+		ethspeed	= <0>;
+		intfreq		= <0>;
+		busfreq		= <0>;
+
+		baudrate	= <0>;
+	};
+
+};
diff --git a/board/svm_sc8xx/svm_sc8xx.c b/board/svm_sc8xx/svm_sc8xx.c
index 1311ea9..9bb9fd0 100644
--- a/board/svm_sc8xx/svm_sc8xx.c
+++ b/board/svm_sc8xx/svm_sc8xx.c
@@ -77,7 +77,7 @@
 
 int checkboard (void)
 {
-    unsigned char *s = getenv("serial#");
+    char *s = getenv("serial#");
     int board_type;
 
     if (!s || strncmp(s, "SVM8", 4)) {
diff --git a/board/total5200/sdram.c b/board/total5200/sdram.c
index 367c826..a1601f2 100644
--- a/board/total5200/sdram.c
+++ b/board/total5200/sdram.c
@@ -102,9 +102,9 @@
 
 	/* find RAM size using SDRAM CS0 only */
 	mpc5xxx_sdram_start(sdram_conf, 0);
-	test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	mpc5xxx_sdram_start(sdram_conf, 1);
-	test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	if (test1 > test2) {
 		mpc5xxx_sdram_start(sdram_conf, 0);
 		dramsize = test1;
@@ -129,9 +129,9 @@
 
 	/* find RAM size using SDRAM CS1 only */
 	mpc5xxx_sdram_start(sdram_conf, 0);
-	test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+	test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 	mpc5xxx_sdram_start(sdram_conf, 1);
-	test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
+	test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x80000000);
 	if (test1 > test2) {
 		mpc5xxx_sdram_start(sdram_conf, 0);
 		dramsize2 = test1;
@@ -199,9 +199,9 @@
 
 	/* find RAM size */
 	mpc5xxx_sdram_start(sdram_conf, 0);
-	test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	mpc5xxx_sdram_start(sdram_conf, 1);
-	test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x80000000);
+	test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x80000000);
 	if (test1 > test2) {
 		mpc5xxx_sdram_start(sdram_conf, 0);
 		dramsize = test1;
diff --git a/board/tqm5200/cmd_stk52xx.c b/board/tqm5200/cmd_stk52xx.c
index c30e9df..8b9057f 100755
--- a/board/tqm5200/cmd_stk52xx.c
+++ b/board/tqm5200/cmd_stk52xx.c
@@ -181,7 +181,7 @@
 static int i2s_play_wave(unsigned long addr, unsigned long len)
 {
 	unsigned long i;
-	unsigned char *wave_file = (char *)addr + 44;	/* quick'n dirty: skip
+	unsigned char *wave_file = (uchar *)addr + 44;	/* quick'n dirty: skip
 							 * wav header*/
 	unsigned char swapped[4];
 	struct mpc5xxx_psc *psc = (struct mpc5xxx_psc*)MPC5XXX_PSC2;
@@ -304,7 +304,7 @@
 static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	unsigned long reg, val, duration;
-	unsigned char *tmp;
+	char *tmp;
 	unsigned int freq, channel;
 	unsigned char volume;
 	int rcode = 1;
diff --git a/board/tqm5200/tqm5200.c b/board/tqm5200/tqm5200.c
index dbd78d5..6aad920 100644
--- a/board/tqm5200/tqm5200.c
+++ b/board/tqm5200/tqm5200.c
@@ -122,9 +122,9 @@
 
 	/* find RAM size using SDRAM CS0 only */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x20000000);
+	test1 = get_ram_size((long *)CFG_SDRAM_BASE, 0x20000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *)CFG_SDRAM_BASE, 0x20000000);
+	test2 = get_ram_size((long *)CFG_SDRAM_BASE, 0x20000000);
 	if (test1 > test2) {
 		sdram_start(0);
 		dramsize = test1;
@@ -150,9 +150,9 @@
 
 	/* find RAM size using SDRAM CS1 only */
 	sdram_start(0);
-	test1 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x20000000);
+	test1 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000);
 	sdram_start(1);
-	test2 = get_ram_size((ulong *)(CFG_SDRAM_BASE + dramsize), 0x20000000);
+	test2 = get_ram_size((long *)(CFG_SDRAM_BASE + dramsize), 0x20000000);
 	if (test1 > test2) {
 		sdram_start(0);
 		dramsize2 = test1;
diff --git a/board/tqm8260/tqm8260.c b/board/tqm8260/tqm8260.c
index 2291987..029863b 100644
--- a/board/tqm8260/tqm8260.c
+++ b/board/tqm8260/tqm8260.c
@@ -195,7 +195,7 @@
  */
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof (str));
 
 	puts ("Board: ");
diff --git a/board/tqm8xx/load_sernum_ethaddr.c b/board/tqm8xx/load_sernum_ethaddr.c
index 98baf7f..143f368 100644
--- a/board/tqm8xx/load_sernum_ethaddr.c
+++ b/board/tqm8xx/load_sernum_ethaddr.c
@@ -96,10 +96,10 @@
 
 	/* set serial# and ethaddr if not yet defined */
 	if (getenv("serial#") == NULL) {
-		setenv ("serial#", serial);
+		setenv ((char *)"serial#", (char *)serial);
 	}
 
 	if (getenv("ethaddr") == NULL) {
-		setenv ("ethaddr", ethaddr);
+		setenv ((char *)"ethaddr", (char *)ethaddr);
 	}
 }
diff --git a/board/tqm8xx/tqm8xx.c b/board/tqm8xx/tqm8xx.c
index a7a6f2a..017bdf9 100644
--- a/board/tqm8xx/tqm8xx.c
+++ b/board/tqm8xx/tqm8xx.c
@@ -106,7 +106,7 @@
 {
 	DECLARE_GLOBAL_DATA_PTR;
 
-	unsigned char *s = getenv ("serial#");
+	char *s = getenv ("serial#");
 
 	puts ("Board: ");
 
@@ -215,7 +215,7 @@
 	 *
 	 * try 8 column mode
 	 */
-	size8 = dram_size (CFG_MAMR_8COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size8 = dram_size (CFG_MAMR_8COL, SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 	debug ("SDRAM Bank 0 in 8 column mode: %ld MB\n", size8 >> 20);
 
@@ -224,7 +224,7 @@
 	/*
 	 * try 9 column mode
 	 */
-	size9 = dram_size (CFG_MAMR_9COL, (ulong *) SDRAM_BASE2_PRELIM,
+	size9 = dram_size (CFG_MAMR_9COL, SDRAM_BASE2_PRELIM,
 					   SDRAM_MAX_SIZE);
 	debug ("SDRAM Bank 0 in 9 column mode: %ld MB\n", size9 >> 20);
 
@@ -263,7 +263,7 @@
 		 * [9 column SDRAM may also be used in 8 column mode,
 		 *  but then only half the real size will be used.]
 		 */
-		size_b1 = dram_size (memctl->memc_mamr, (ulong *) SDRAM_BASE3_PRELIM,
+		size_b1 = dram_size (memctl->memc_mamr, (long int *)SDRAM_BASE3_PRELIM,
 				     SDRAM_MAX_SIZE);
 		debug ("SDRAM Bank 1: %ld MB\n", size_b1 >> 20);
 	} else {
diff --git a/board/uc100/uc100.c b/board/uc100/uc100.c
index 6fc68e5..1387b93 100644
--- a/board/uc100/uc100.c
+++ b/board/uc100/uc100.c
@@ -147,7 +147,7 @@
  */
 int checkboard (void)
 {
-	unsigned char str[64];
+	char str[64];
 	int i = getenv_r ("serial#", str, sizeof(str));
 
 	puts ("Board: ");
diff --git a/board/w7o/flash.c b/board/w7o/flash.c
index d6ea635..32815fb 100644
--- a/board/w7o/flash.c
+++ b/board/w7o/flash.c
@@ -805,7 +805,7 @@
     int flag;
     ulong status;
     int rcode = 0;
-    volatile long *addr = (unsigned long *)sector;
+    volatile long *addr = (long *)sector;
 
     switch(info->flash_id & FLASH_TYPEMASK) {
 	case FLASH_28F320J3A:
@@ -863,7 +863,7 @@
     int flag;
     ulong status;
     int rcode = 0;
-    volatile long *addr = (unsigned long *)sector;
+    volatile long *addr = (long *)sector;
 
     switch(info->flash_id & FLASH_TYPEMASK) {
 	case FLASH_28F320J3A:
diff --git a/board/w7o/fpga.c b/board/w7o/fpga.c
index 336bfba..100bce4 100644
--- a/board/w7o/fpga.c
+++ b/board/w7o/fpga.c
@@ -252,7 +252,7 @@
     xcv_len = len - 14 - fn_len;		/* fpga image length */
 
     /* Check for uninitialized FLASH */
-    if ((strncmp(buf, "w7o", 3)!=0) || (len > 0x0007ffffL) || (len == 0))
+    if ((strncmp((char *)buf, "w7o", 3)!=0) || (len > 0x0007ffffL) || (len == 0))
 	goto bad_image;
 
     /*
diff --git a/board/w7o/vpd.c b/board/w7o/vpd.c
index fc2cd983..2ce1568 100644
--- a/board/w7o/vpd.c
+++ b/board/w7o/vpd.c
@@ -125,7 +125,7 @@
     unsigned short  stored_crc16, calc_crc16 = 0xffff;
 
     /* Check Eyecatcher */
-    if (strncmp(vpd->header.eyecatcher, VPD_EYECATCHER, VPD_EYE_SIZE) != 0) {
+    if (strncmp((char *)(vpd->header.eyecatcher), VPD_EYECATCHER, VPD_EYE_SIZE) != 0) {
 	unsigned offset = 0;
 	if (dev_addr == CFG_DEF_EEPROM_ADDR)
 	    offset += SDRAM_SPD_DATA_SIZE;
@@ -259,7 +259,7 @@
 	    case VPD_PID_PID:
 		if (strlen_ok(packet, MAX_PROD_ID)) {
 		    strncpy(vpdInfo->productId,
-			    packet->data, packet->size);
+			    (char *)(packet->data), packet->size);
 		}
 		break;
 	    case VPD_PID_REV:
diff --git a/board/w7o/w7o.c b/board/w7o/w7o.c
index daf7f53..c56c269 100644
--- a/board/w7o/w7o.c
+++ b/board/w7o/w7o.c
@@ -207,8 +207,8 @@
 	     (strncmp (vpd->productId, "CMM", 3) == 0))) {
 		char buf[30];
 		char *eth;
-		unsigned char *serial = getenv ("serial#");
-		unsigned char *ethaddr = getenv ("ethaddr");
+		char *serial = getenv ("serial#");
+		char *ethaddr = getenv ("ethaddr");
 
 		/* Set 'serial#' envvar if serial# isn't set */
 		if (!serial) {
@@ -218,7 +218,7 @@
 		}
 
 		/* Set 'ethaddr' envvar if 'ethaddr' envvar is the default */
-		eth = vpd->ethAddrs[0];
+		eth = (char *)(vpd->ethAddrs[0]);
 		if (ethaddr
 		    && (strcmp (ethaddr, MK_STR (CONFIG_ETHADDR)) == 0)) {
 			/* Now setup ethaddr */
diff --git a/board/xilinx/common/xdma_channel.c b/board/xilinx/common/xdma_channel.c
index 25f1e26..3d5fc75 100644
--- a/board/xilinx/common/xdma_channel.c
+++ b/board/xilinx/common/xdma_channel.c
@@ -123,7 +123,7 @@
 
 	/* initialize the version of the component
 	 */
-	XVersion_FromString(&InstancePtr->Version, "1.00a");
+	XVersion_FromString(&InstancePtr->Version, (s8 *)"1.00a");
 
 	/* reset the DMA channel such that it's in a known state and ready
 	 * and indicate the initialization occured with no errors, note that
diff --git a/board/xilinx/ml300/ml300.c b/board/xilinx/ml300/ml300.c
index f335fc1..dad562f 100644
--- a/board/xilinx/ml300/ml300.c
+++ b/board/xilinx/ml300/ml300.c
@@ -55,8 +55,8 @@
 int
 checkboard(void)
 {
-	uchar tmp[64];		/* long enough for environment variables */
-	uchar *s, *e;
+	char tmp[64];		/* long enough for environment variables */
+	char *s, *e;
 	int i = getenv_r("L", tmp, sizeof (tmp));
 
 	if (i < 0) {
diff --git a/board/xilinx/xilinx_enet/emac_adapter.c b/board/xilinx/xilinx_enet/emac_adapter.c
index bf8cf0b..1076345 100644
--- a/board/xilinx/xilinx_enet/emac_adapter.c
+++ b/board/xilinx/xilinx_enet/emac_adapter.c
@@ -148,7 +148,7 @@
 	RecvFrameLength = PKTSIZE;
 	Result = XEmac_PollRecv(&Emac, (u8 *) etherrxbuff, &RecvFrameLength);
 	if (Result == XST_SUCCESS) {
-		NetReceive(etherrxbuff, RecvFrameLength);
+		NetReceive((uchar)etherrxbuff, RecvFrameLength);
 		return (1);
 	} else {
 		return (0);
diff --git a/board/xilinx/xilinx_iic/iic_adapter.c b/board/xilinx/xilinx_iic/iic_adapter.c
index 5ad4a0c..f3ecba7 100644
--- a/board/xilinx/xilinx_iic/iic_adapter.c
+++ b/board/xilinx/xilinx_iic/iic_adapter.c
@@ -291,15 +291,15 @@
 static void
 ip_ml300(uchar * s, uchar * res)
 {
-	uchar temp[2];
+	char temp[2];
 	u8 i;
 
 	res[0] = 0x00;
 
 	for (i = 0; i < 4; i++) {
 		sprintf(temp, "%02x", atoi(s));
-		s = strchr(s, '.') + 1;
-		strcat(res, temp);
+		s = (uchar *)strchr((char *)s, '.') + 1;
+		strcat((char *)res, temp);
 	}
 }
 
@@ -310,8 +310,8 @@
 change_null(uchar * s)
 {
 	if (s != NULL) {
-		change_null(strchr(s + 1, 255));
-		*(strchr(s, 255)) = '\0';
+		change_null((uchar *)strchr((char *)s + 1, 255));
+		*(strchr((char *)s, 255)) = '\0';
 	}
 }
 
@@ -321,8 +321,8 @@
 void
 convert_env(void)
 {
-	uchar *s;		/* pointer to env value */
-	uchar temp[20];		/* temp storage for addresses */
+	char *s;		/* pointer to env value */
+	char temp[20];		/* temp storage for addresses */
 
 	/* E -> ethaddr */
 	s = getenv("E");
@@ -345,8 +345,8 @@
 	/* I -> ipaddr */
 	s = getenv("I");
 	if (s != NULL) {
-		sprintf(temp, "%d.%d.%d.%d", axtoi(s), axtoi(s + 2),
-			axtoi(s + 4), axtoi(s + 6));
+		sprintf(temp, "%d.%d.%d.%d", axtoi((u8 *)s), axtoi((u8 *)(s + 2)),
+			axtoi((u8 *)(s + 4)), axtoi((u8 *)(s + 6)));
 		setenv("ipaddr", temp);
 		setenv("I", NULL);
 	}
@@ -354,8 +354,8 @@
 	/* S -> serverip */
 	s = getenv("S");
 	if (s != NULL) {
-		sprintf(temp, "%d.%d.%d.%d", axtoi(s), axtoi(s + 2),
-			axtoi(s + 4), axtoi(s + 6));
+		sprintf(temp, "%d.%d.%d.%d", axtoi((u8 *)s), axtoi((u8 *)(s + 2)),
+			axtoi((u8 *)(s + 4)), axtoi((u8 *)(s + 6)));
 		setenv("serverip", temp);
 		setenv("S", NULL);
 	}
@@ -391,9 +391,9 @@
 static void
 save_env(void)
 {
-	uchar eprom[ENV_SIZE];	/* buffer to be written back to EEPROM */
-	uchar *s, temp[20];
-	uchar ff[] = { 0xff, 0x00 };	/* dummy null value */
+	char eprom[ENV_SIZE];	/* buffer to be written back to EEPROM */
+	char *s, temp[20];
+	char ff[] = { 0xff, 0x00 };	/* dummy null value */
 	u32 len;		/* length of env to be written to EEPROM */
 
 	eprom[0] = 0x00;
@@ -422,7 +422,7 @@
 	s = getenv("ipaddr");
 	if (s != NULL) {
 		strcat(eprom, "I=");
-		ip_ml300(s, temp);
+		ip_ml300((uchar *)s, (uchar *)temp);
 		strcat(eprom, temp);
 		strcat(eprom, ff);
 	}
@@ -431,7 +431,7 @@
 	s = getenv("serverip");
 	if (s != NULL) {
 		strcat(eprom, "S=");
-		ip_ml300(s, temp);
+		ip_ml300((uchar *)s, (uchar *)temp);
 		strcat(eprom, temp);
 		strcat(eprom, ff);
 	}
@@ -461,11 +461,11 @@
 	}
 
 	len = strlen(eprom);	/* find env length without crc */
-	change_null(eprom);	/* change 0xff to 0x00 */
+	change_null((uchar *)eprom);	/* change 0xff to 0x00 */
 
 	/* update EEPROM env values if there is enough space */
-	if (update_crc(len, eprom) == 0)
-		send(CFG_ENV_OFFSET, eprom, len + 6);
+	if (update_crc(len, (uchar *)eprom) == 0)
+		send(CFG_ENV_OFFSET, (uchar *)eprom, len + 6);
 }
 
 /************************************************************************
diff --git a/common/Makefile b/common/Makefile
index 6366e02..7dbf84a 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -46,7 +46,7 @@
 	  env_nand.o env_dataflash.o env_flash.o env_eeprom.o \
 	  env_nvram.o env_nowhere.o \
 	  exports.o \
-	  flash.o fpga.o \
+	  flash.o fpga.o ft_build.o \
 	  hush.o kgdb.o lcd.o lists.o lynxkdi.o \
 	  memsize.o miiphybb.o miiphyutil.o \
 	  s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o \
diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c
index 2d1f431..e325302 100644
--- a/common/cmd_autoscript.c
+++ b/common/cmd_autoscript.c
@@ -76,7 +76,7 @@
 	hdr->ih_hcrc = 0;
 	len = sizeof (image_header_t);
 	data = (ulong)hdr;
-	if (crc32(0, (char *)data, len) != crc) {
+	if (crc32(0, (uchar *)data, len) != crc) {
 		puts ("Bad header crc\n");
 		return 1;
 	}
@@ -85,7 +85,7 @@
 	len = ntohl(hdr->ih_size);
 
 	if (verify) {
-		if (crc32(0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
+		if (crc32(0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {
 			puts ("Bad data crc\n");
 			return 1;
 		}
diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index daa54e7..ad412c8 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -29,12 +29,15 @@
 #include <bmp_layout.h>
 #include <command.h>
 #include <asm/byteorder.h>
+#include <malloc.h>
 
 #if (CONFIG_COMMANDS & CFG_CMD_BMP)
 
 static int bmp_info (ulong addr);
 static int bmp_display (ulong addr, int x, int y);
 
+int gunzip(void *, int, unsigned char *, unsigned long *);
+
 /*
  * Subroutine:  do_bmp
  *
@@ -100,15 +103,64 @@
 static int bmp_info(ulong addr)
 {
 	bmp_image_t *bmp=(bmp_image_t *)addr;
+#ifdef CONFIG_VIDEO_BMP_GZIP
+	unsigned char *dst = NULL;
+	ulong len;
+#endif /* CONFIG_VIDEO_BMP_GZIP */
+
 	if (!((bmp->header.signature[0]=='B') &&
 	      (bmp->header.signature[1]=='M'))) {
+
+#ifdef CONFIG_VIDEO_BMP_GZIP
+		/*
+		 * Decompress bmp image
+		 */
+		len = CFG_VIDEO_LOGO_MAX_SIZE;
+		dst = malloc(CFG_VIDEO_LOGO_MAX_SIZE);
+		if (dst == NULL) {
+			printf("Error: malloc in gunzip failed!\n");
+			return(1);
+		}
+		if (gunzip(dst, CFG_VIDEO_LOGO_MAX_SIZE, (uchar *)addr, &len) != 0) {
+			printf("There is no valid bmp file at the given address\n");
+			return(1);
+		}
+		if (len == CFG_VIDEO_LOGO_MAX_SIZE) {
+			printf("Image could be truncated (increase CFG_VIDEO_LOGO_MAX_SIZE)!\n");
+		}
+
+		/*
+		 * Set addr to decompressed image
+		 */
+		bmp = (bmp_image_t *)dst;
+
+		/*
+		 * Check for bmp mark 'BM'
+		 */
+		if (!((bmp->header.signature[0] == 'B') &&
+		      (bmp->header.signature[1] == 'M'))) {
+			printf("There is no valid bmp file at the given address\n");
+			free(dst);
+			return(1);
+		}
+
+		printf("Gzipped BMP image detected!\n");
+#else /* CONFIG_VIDEO_BMP_GZIP */
 		printf("There is no valid bmp file at the given address\n");
 		return(1);
+#endif /* CONFIG_VIDEO_BMP_GZIP */
 	}
 	printf("Image size    : %d x %d\n", le32_to_cpu(bmp->header.width),
 	       le32_to_cpu(bmp->header.height));
 	printf("Bits per pixel: %d\n", le16_to_cpu(bmp->header.bit_count));
 	printf("Compression   : %d\n", le32_to_cpu(bmp->header.compression));
+
+#ifdef CONFIG_VIDEO_BMP_GZIP
+	if (dst) {
+		free(dst);
+	}
+#endif /* CONFIG_VIDEO_BMP_GZIP */
+
 	return(0);
 }
 
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 6a5576c..8599a49 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -34,6 +34,10 @@
 #include <environment.h>
 #include <asm/byteorder.h>
 
+#ifdef CONFIG_OF_FLAT_TREE
+#include <ft_build.h>
+#endif
+
  /*cmd_boot.c*/
  extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 
@@ -197,7 +201,7 @@
 	checksum = ntohl(hdr->ih_hcrc);
 	hdr->ih_hcrc = 0;
 
-	if (crc32 (0, (char *)data, len) != checksum) {
+	if (crc32 (0, (uchar *)data, len) != checksum) {
 		puts ("Bad Header Checksum\n");
 		SHOW_BOOT_PROGRESS (-2);
 		return 1;
@@ -221,7 +225,7 @@
 
 	if (verify) {
 		puts ("   Verifying Checksum ... ");
-		if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
+		if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {
 			printf ("Bad Data CRC\n");
 			SHOW_BOOT_PROGRESS (-3);
 			return 1;
@@ -489,6 +493,11 @@
 }
 #endif /* CONFIG_SILENT_CONSOLE */
 
+#ifdef CONFIG_OF_FLAT_TREE
+extern const unsigned char oftree_dtb[];
+extern const unsigned int oftree_dtb_len;
+#endif
+
 #ifdef CONFIG_PPC
 static void
 do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
@@ -511,6 +520,9 @@
 	bd_t	*kbd;
 	void	(*kernel)(bd_t *, ulong, ulong, ulong, ulong);
 	image_header_t *hdr = &header;
+#ifdef CONFIG_OF_FLAT_TREE
+	char	*of_flat_tree;
+#endif
 
 	if ((s = getenv ("initrd_high")) != NULL) {
 		/* a value of "no" or a similar string will act like 0,
@@ -621,7 +633,7 @@
 		checksum = hdr->ih_hcrc;
 		hdr->ih_hcrc = 0;
 
-		if (crc32 (0, (char *)data, len) != checksum) {
+		if (crc32 (0, (uchar *)data, len) != checksum) {
 			puts ("Bad Header Checksum\n");
 			SHOW_BOOT_PROGRESS (-11);
 			do_reset (cmdtp, flag, argc, argv);
@@ -649,13 +661,13 @@
 
 				if (chunk > CHUNKSZ)
 					chunk = CHUNKSZ;
-				csum = crc32 (csum, (char *)cdata, chunk);
+				csum = crc32 (csum, (uchar *)cdata, chunk);
 				cdata += chunk;
 
 				WATCHDOG_RESET();
 			}
 #else	/* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
-			csum = crc32 (0, (char *)data, len);
+			csum = crc32 (0, (uchar *)data, len);
 #endif	/* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
 
 			if (csum != hdr->ih_dcrc) {
@@ -776,15 +788,26 @@
 		initrd_end = 0;
 	}
 
+#ifdef CONFIG_OF_FLAT_TREE
+	if (initrd_start == 0)
+		of_flat_tree = (char *)(((ulong)kbd - OF_FLAT_TREE_MAX_SIZE -
+					sizeof(bd_t)) & ~0xF);
+	else
+		of_flat_tree = (char *)((initrd_start - OF_FLAT_TREE_MAX_SIZE -
+					sizeof(bd_t)) & ~0xF);
+#endif
 
 	debug ("## Transferring control to Linux (at address %08lx) ...\n",
 		(ulong)kernel);
 
 	SHOW_BOOT_PROGRESS (15);
 
+#ifndef CONFIG_OF_FLAT_TREE
+
 #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
 	unlock_ram_in_cache();
 #endif
+
 	/*
 	 * Linux Kernel Parameters:
 	 *   r3: ptr to board info data
@@ -794,6 +817,25 @@
 	 *   r7: End   of command line string
 	 */
 	(*kernel) (kbd, initrd_start, initrd_end, cmd_start, cmd_end);
+
+#else
+	ft_setup(of_flat_tree, OF_FLAT_TREE_MAX_SIZE, kbd);
+	/* ft_dump_blob(of_flat_tree); */
+
+#if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
+	unlock_ram_in_cache();
+#endif
+	/*
+	 * Linux Kernel Parameters:
+	 *   r3: ptr to OF flat tree, followed by the board info data
+	 *   r4: initrd_start or 0 if no initrd
+	 *   r5: initrd_end - unused if r4 is 0
+	 *   r6: Start of command line string
+	 *   r7: End   of command line string
+	 */
+	(*kernel) ((bd_t *)of_flat_tree, initrd_start, initrd_end, cmd_start, cmd_end);
+
+#endif
 }
 #endif /* CONFIG_PPC */
 
@@ -1037,7 +1079,7 @@
 	checksum = ntohl(hdr->ih_hcrc);
 	hdr->ih_hcrc = 0;
 
-	if (crc32 (0, (char *)data, len) != checksum) {
+	if (crc32 (0, (uchar *)data, len) != checksum) {
 		puts ("   Bad Header Checksum\n");
 		return 1;
 	}
@@ -1049,7 +1091,7 @@
 	len  = ntohl(hdr->ih_size);
 
 	puts ("   Verifying Checksum ... ");
-	if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
+	if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {
 		puts ("   Bad Data CRC\n");
 		return 1;
 	}
@@ -1094,7 +1136,7 @@
 			checksum = ntohl(header.ih_hcrc);
 			header.ih_hcrc = 0;
 
-			if (crc32 (0, (char *)&header, sizeof(image_header_t))
+			if (crc32 (0, (uchar *)&header, sizeof(image_header_t))
 			    != checksum)
 				goto next_sector;
 
@@ -1105,7 +1147,7 @@
 			len  = ntohl(hdr->ih_size);
 
 			puts ("   Verifying Checksum ... ");
-			if (crc32 (0, (char *)data, len) != ntohl(hdr->ih_dcrc)) {
+			if (crc32 (0, (uchar *)data, len) != ntohl(hdr->ih_dcrc)) {
 				puts ("   Bad Data CRC\n");
 			}
 			puts ("OK\n");
diff --git a/common/cmd_doc.c b/common/cmd_doc.c
index e5db1bc..5e9bea3 100644
--- a/common/cmd_doc.c
+++ b/common/cmd_doc.c
@@ -143,7 +143,7 @@
 			cmd ? "read" : "write", curr_device, off, size);
 
 		ret = doc_rw(doc_dev_desc + curr_device, cmd, off, size,
-			     &total, (u_char*)addr);
+			     (size_t *)&total, (u_char*)addr);
 
 		printf ("%d bytes %s: %s\n", total, cmd ? "read" : "write",
 			ret ? "ERROR" : "OK");
@@ -304,12 +304,12 @@
 
 		if (cmd)
 			ret = doc_read_ecc(this, from, len,
-					   &n, (u_char*)buf,
-					   noecc ? NULL : eccbuf);
+					   (size_t *)&n, (u_char*)buf,
+					   noecc ? (uchar *)NULL : (uchar *)eccbuf);
 		else
 			ret = doc_write_ecc(this, from, len,
-					    &n, (u_char*)buf,
-					    noecc ? NULL : eccbuf);
+					    (size_t *)&n, (u_char*)buf,
+					    noecc ? (uchar *)NULL : (uchar *)eccbuf);
 
 		if (ret)
 			break;
@@ -804,7 +804,7 @@
 		/* Check for ANAND header first. Then can whinge if it's found but later
 		   checks fail */
 		if ((ret = doc_read_ecc(nftl->mtd, block * nftl->EraseSize, SECTORSIZE,
-					&retlen, buf, NULL))) {
+					(size_t *)&retlen, buf, NULL))) {
 			static int warncount = 5;
 
 			if (warncount) {
@@ -829,7 +829,7 @@
 
 		/* To be safer with BIOS, also use erase mark as discriminant */
 		if ((ret = doc_read_oob(nftl->mtd, block * nftl->EraseSize + SECTORSIZE + 8,
-				8, &retlen, (char *)&h1) < 0)) {
+				8, (size_t *)&retlen, (uchar *)&h1) < 0)) {
 #ifdef NFTL_DEBUG
 			printf("ANAND header found at 0x%x, but OOB data read failed\n",
 			       block * nftl->EraseSize);
@@ -902,7 +902,7 @@
 				/* read one sector for every SECTORSIZE of blocks */
 				if ((ret = doc_read_ecc(nftl->mtd, block * nftl->EraseSize +
 						       i + SECTORSIZE, SECTORSIZE,
-						       &retlen, buf, (char *)&oob)) < 0) {
+						       (size_t *)&retlen, buf, (uchar *)&oob)) < 0) {
 					puts ("Read of bad sector table failed\n");
 					return -1;
 				}
diff --git a/common/cmd_ext2.c b/common/cmd_ext2.c
index af836cd..927e22f 100644
--- a/common/cmd_ext2.c
+++ b/common/cmd_ext2.c
@@ -231,7 +231,7 @@
 			return(1);
 		}
 
-		if (strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
+		if (strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
 			printf ("\n** Invalid partition type \"%.32s\""
 				" (expect \"" BOOT_PART_TYPE "\")\n",
 				info.type);
diff --git a/common/cmd_fpga.c b/common/cmd_fpga.c
index c4b7392..9a01e7d 100644
--- a/common/cmd_fpga.c
+++ b/common/cmd_fpga.c
@@ -69,7 +69,7 @@
 	unsigned int i;
 	int rc;
 
-	dataptr = fpgadata;
+	dataptr = (unsigned char *)fpgadata;
 
 #if CFG_FPGA_XILINX
 	/* skip the first bytes of the bitsteam, their meaning is unknown */
diff --git a/common/cmd_i2c.c b/common/cmd_i2c.c
index 2e44c7f..c543bb5 100644
--- a/common/cmd_i2c.c
+++ b/common/cmd_i2c.c
@@ -461,7 +461,7 @@
 	 */
 	do {
 		printf("%08lx:", addr);
-		if(i2c_read(chip, addr, alen, (char *)&data, size) != 0) {
+		if(i2c_read(chip, addr, alen, (uchar *)&data, size) != 0) {
 			puts ("\nError reading the chip,\n");
 		} else {
 			data = cpu_to_be32(data);
@@ -510,7 +510,7 @@
 				 */
 				reset_cmd_timeout();
 #endif
-				if(i2c_write(chip, addr, alen, (char *)&data, size) != 0) {
+				if(i2c_write(chip, addr, alen, (uchar *)&data, size) != 0) {
 					puts ("Error writing the chip.\n");
 				}
 #ifdef CFG_EEPROM_PAGE_WRITE_DELAY_MS
diff --git a/common/cmd_ide.c b/common/cmd_ide.c
index 1adfe2b..6663dea 100644
--- a/common/cmd_ide.c
+++ b/common/cmd_ide.c
@@ -417,8 +417,8 @@
 		SHOW_BOOT_PROGRESS (-1);
 		return 1;
 	}
-	if ((strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
-	    (strncmp(info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
+	if ((strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
+	    (strncmp((char *)info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
 		printf ("\n** Invalid partition type \"%.32s\""
 			" (expect \"" BOOT_PART_TYPE "\")\n",
 			info.type);
@@ -450,7 +450,7 @@
 	checksum = ntohl(hdr->ih_hcrc);
 	hdr->ih_hcrc = 0;
 
-	if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) {
+	if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) {
 		puts ("\n** Bad Header Checksum **\n");
 		SHOW_BOOT_PROGRESS (-2);
 		return 1;
diff --git a/common/cmd_immap.c b/common/cmd_immap.c
index 9db5f2c..559d7b4 100644
--- a/common/cmd_immap.c
+++ b/common/cmd_immap.c
@@ -318,11 +318,20 @@
 do_iopset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
 	uint rcode = 0;
+	iopin_t iopin;
 	static uint port = 0;
 	static uint pin = 0;
 	static uint value = 0;
-	static enum { DIR, PAR, SOR, ODR, DAT, INT } cmd = DAT;
-	iopin_t iopin;
+	static enum {
+		DIR,
+		PAR,
+		SOR,
+		ODR,
+		DAT,
+#if defined(CONFIG_8xx)
+		INT
+#endif
+	} cmd = DAT;
 
 	if (argc != 5) {
 		puts ("iopset PORT PIN CMD VALUE\n");
@@ -374,6 +383,7 @@
 	if (rcode == 0) {
 		iopin.port = port;
 		iopin.pin = pin;
+		iopin.flag = 0;
 		switch (cmd) {
 		case DIR:
 			if (value)
diff --git a/common/cmd_load.c b/common/cmd_load.c
index b85db69..7498497 100644
--- a/common/cmd_load.c
+++ b/common/cmd_load.c
@@ -166,7 +166,7 @@
 		    if (addr2info(store_addr)) {
 			int rc;
 
-			rc = flash_write((uchar *)binbuf,store_addr,binlen);
+			rc = flash_write((char *)binbuf,store_addr,binlen);
 			if (rc != 0) {
 				flash_perror (rc);
 				return (~0);
diff --git a/common/cmd_log.c b/common/cmd_log.c
index 57ef484..efc9689 100644
--- a/common/cmd_log.c
+++ b/common/cmd_log.c
@@ -179,7 +179,7 @@
 	case 2:
 		if (strcmp(argv[1],"show") == 0) {
 			for (i=0; i < (log_size&LOGBUFF_MASK); i++) {
-				s = log_buf+((log_start+i)&LOGBUFF_MASK);
+				s = (char *)log_buf+((log_start+i)&LOGBUFF_MASK);
 				putc (*s);
 			}
 			return 0;
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index bafb1d6..0f4f9b7 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -179,7 +179,7 @@
 		}
 #endif
 		puts ("    ");
-		cp = linebuf;
+		cp = (u_char *)linebuf;
 		for (i=0; i<linebytes; i++) {
 			if ((*cp < 0x20) || (*cp > 0x7e))
 				putc ('.');
@@ -430,7 +430,7 @@
 
 		puts ("Copy to Flash... ");
 
-		rc = flash_write ((uchar *)addr, dest, count*size);
+		rc = flash_write ((char *)addr, dest, count*size);
 		if (rc != 0) {
 			flash_perror (rc);
 			return (1);
diff --git a/common/cmd_nand.c b/common/cmd_nand.c
index 5648ab2..b0c01d1 100644
--- a/common/cmd_nand.c
+++ b/common/cmd_nand.c
@@ -200,12 +200,12 @@
 			/* read out-of-band data */
 			if (cmd & NANDRW_READ) {
 				ret = nand_read_oob(nand_dev_desc + curr_device,
-						    off, size, &total,
+						    off, size, (size_t *)&total,
 						    (u_char*)addr);
 			}
 			else {
 				ret = nand_write_oob(nand_dev_desc + curr_device,
-						     off, size, &total,
+						     off, size, (size_t *)&total,
 						     (u_char*)addr);
 			}
 			return ret;
@@ -241,7 +241,7 @@
 			curr_device, off, size);
 
 		ret = nand_rw(nand_dev_desc + curr_device, cmd, off, size,
-			     &total, (u_char*)addr);
+			     (size_t *)&total, (u_char*)addr);
 
 		printf (" %d bytes %s: %s\n", total,
 			(cmd & NANDRW_READ) ? "read" : "written",
@@ -401,7 +401,7 @@
  */
 int check_block (struct nand_chip *nand, unsigned long pos)
 {
-	int retlen;
+	size_t retlen;
 	uint8_t oob_data;
 	uint16_t oob_data16[6];
 	int page0 = pos & (-nand->erasesize);
@@ -423,9 +423,9 @@
 			return 1;
 	} else {
 		/* Note - bad block marker can be on first or second page */
-		if (nand_read_oob(nand, page0 + badpos, 1, &retlen, &oob_data)
+		if (nand_read_oob(nand, page0 + badpos, 1, &retlen, (unsigned char *)&oob_data)
 		    || oob_data != 0xff
-		    || nand_read_oob (nand, page1 + badpos, 1, &retlen, &oob_data)
+		    || nand_read_oob (nand, page1 + badpos, 1, &retlen, (unsigned char *)&oob_data)
 		    || oob_data != 0xff)
 			return 1;
 	}
@@ -501,11 +501,11 @@
 		if (cmd & NANDRW_READ) {
 			ret = nand_read_ecc(nand, start,
 					   min(len, eblk + erasesize - start),
-					   &n, (u_char*)buf, eccbuf);
+					   (size_t *)&n, (u_char*)buf, (u_char *)eccbuf);
 		} else {
 			ret = nand_write_ecc(nand, start,
 					    min(len, eblk + erasesize - start),
-					    &n, (u_char*)buf, eccbuf);
+					    (size_t *)&n, (u_char*)buf, (u_char *)eccbuf);
 		}
 
 		if (ret)
@@ -1591,7 +1591,7 @@
 					l = NAND_JFFS2_OOB16_FSDALEN;
 				}
 
-				ret = nand_write_oob(nand, ofs + p, l, &n,
+				ret = nand_write_oob(nand, ofs + p, l, (size_t *)&n,
 						     (u_char *)&clean_marker);
 				/* quit here if write failed */
 				if (ret)
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 578b0ca..1babffe 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -124,7 +124,7 @@
 
 			for (nxt=j; env_get_char(nxt) != '\0'; ++nxt)
 				;
-			k = envmatch(name, j);
+			k = envmatch((uchar *)name, j);
 			if (k < 0) {
 				continue;
 			}
@@ -157,7 +157,7 @@
 	int   i, len, oldval;
 	int   console = -1;
 	uchar *env, *nxt = NULL;
-	uchar *name;
+	char *name;
 	bd_t *bd = gd->bd;
 
 	uchar *env_data = env_get_addr(0);
@@ -174,7 +174,7 @@
 	for (env=env_data; *env; env=nxt+1) {
 		for (nxt=env; *nxt; ++nxt)
 			;
-		if ((oldval = envmatch(name, env-env_data)) >= 0)
+		if ((oldval = envmatch((uchar *)name, env-env_data)) >= 0)
 			break;
 	}
 
@@ -191,7 +191,7 @@
 		if ( (strcmp (name, "serial#") == 0) ||
 		    ((strcmp (name, "ethaddr") == 0)
 #if defined(CONFIG_OVERWRITE_ETHADDR_ONCE) && defined(CONFIG_ETHADDR)
-		     && (strcmp (env_get_addr(oldval),MK_STR(CONFIG_ETHADDR)) != 0)
+		     && (strcmp ((char *)env_get_addr(oldval),MK_STR(CONFIG_ETHADDR)) != 0)
 #endif	/* CONFIG_OVERWRITE_ETHADDR_ONCE && CONFIG_ETHADDR */
 		    ) ) {
 			printf ("Can't overwrite \"%s\"\n", name);
@@ -483,7 +483,7 @@
  * or NULL if not found
  */
 
-char *getenv (uchar *name)
+char *getenv (char *name)
 {
 	int i, nxt;
 
@@ -497,15 +497,15 @@
 				return (NULL);
 			}
 		}
-		if ((val=envmatch(name, i)) < 0)
+		if ((val=envmatch((uchar *)name, i)) < 0)
 			continue;
-		return (env_get_addr(val));
+		return ((char *)env_get_addr(val));
 	}
 
 	return (NULL);
 }
 
-int getenv_r (uchar *name, uchar *buf, unsigned len)
+int getenv_r (char *name, char *buf, unsigned len)
 {
 	int i, nxt;
 
@@ -517,7 +517,7 @@
 				return (-1);
 			}
 		}
-		if ((val=envmatch(name, i)) < 0)
+		if ((val=envmatch((uchar *)name, i)) < 0)
 			continue;
 		/* found; copy out */
 		n = 0;
diff --git a/common/cmd_pcmcia.c b/common/cmd_pcmcia.c
index 31f2ba2..62446d4 100644
--- a/common/cmd_pcmcia.c
+++ b/common/cmd_pcmcia.c
@@ -2681,7 +2681,7 @@
 #define	MAX_IDENT_FIELDS	4
 
 static uchar *known_cards[] = {
-	"ARGOSY PnPIDE D5",
+	(uchar *)"ARGOSY PnPIDE D5",
 	NULL
 };
 
@@ -2722,12 +2722,12 @@
 		else
 			break;
 	}
-	puts (id_str);
+	puts ((char *)id_str);
 	putc ('\n');
 
 	for (card=known_cards; *card; ++card) {
 		debug ("## Compare against \"%s\"\n", *card);
-		if (strcmp(*card, id_str) == 0) {	/* found! */
+		if (strcmp((char *)*card, (char *)id_str) == 0) {	/* found! */
 			debug ("## CARD FOUND ##\n");
 			return (1);
 		}
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index ec53790..e804861 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -247,8 +247,8 @@
 		printf("error reading partinfo\n");
 		return 1;
 	}
-	if ((strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
-	    (strncmp(info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
+	if ((strncmp((char *)(info.type), BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
+	    (strncmp((char *)(info.type), BOOT_PART_COMP, sizeof(info.type)) != 0)) {
 		printf ("\n** Invalid partition type \"%.32s\""
 			" (expect \"" BOOT_PART_TYPE "\")\n",
 			info.type);
@@ -277,7 +277,7 @@
 	checksum = ntohl(hdr->ih_hcrc);
 	hdr->ih_hcrc = 0;
 
-	if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) {
+	if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) {
 		puts ("\n** Bad Header Checksum **\n");
 		return 1;
 	}
diff --git a/common/cmd_spi.c b/common/cmd_spi.c
index 7b6faf7..a6fdf7f 100644
--- a/common/cmd_spi.c
+++ b/common/cmd_spi.c
@@ -119,7 +119,7 @@
 		printf("Error with the SPI transaction.\n");
 		rcode = 1;
 	} else {
-		cp = din;
+		cp = (char *)din;
 		for(j = 0; j < ((bitlen + 7) / 8); j++) {
 			printf("%02X", *cp++);
 		}
diff --git a/common/cmd_usb.c b/common/cmd_usb.c
index 0738f55..fdfd042 100644
--- a/common/cmd_usb.c
+++ b/common/cmd_usb.c
@@ -362,15 +362,15 @@
 
 	if (get_partition_info (stor_dev, part, &info)) {
 		/* try to boot raw .... */
-		strncpy(&info.type[0], BOOT_PART_TYPE, sizeof(BOOT_PART_TYPE));
-		strncpy(&info.name[0], "Raw", 4);
+		strncpy((char *)&info.type[0], BOOT_PART_TYPE, sizeof(BOOT_PART_TYPE));
+		strncpy((char *)&info.name[0], "Raw", 4);
 		info.start=0;
 		info.blksz=0x200;
 		info.size=2880;
 		printf("error reading partinfo...try to boot raw\n");
 	}
-	if ((strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
-	    (strncmp(info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
+	if ((strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) &&
+	    (strncmp((char *)info.type, BOOT_PART_COMP, sizeof(info.type)) != 0)) {
 		printf ("\n** Invalid partition type \"%.32s\""
 			" (expect \"" BOOT_PART_TYPE "\")\n",
 			info.type);
@@ -398,7 +398,7 @@
 	checksum = ntohl(hdr->ih_hcrc);
 	hdr->ih_hcrc = 0;
 
-	if (crc32 (0, (char *)hdr, sizeof(image_header_t)) != checksum) {
+	if (crc32 (0, (uchar *)hdr, sizeof(image_header_t)) != checksum) {
 		puts ("\n** Bad Header Checksum **\n");
 		return 1;
 	}
diff --git a/common/env_common.c b/common/env_common.c
index 9be4cc1..3201135 100644
--- a/common/env_common.c
+++ b/common/env_common.c
@@ -283,7 +283,7 @@
 		for (nxt=i; env_get_char(nxt) != '\0'; ++nxt)
 			;
 
-		lval = env_get_addr(i);
+		lval = (char *)env_get_addr(i);
 		rval = strchr(lval, '=');
 		if (rval != NULL) {
 			vallen = rval - lval;
diff --git a/common/env_flash.c b/common/env_flash.c
index d6257d0..a2ea9c4 100644
--- a/common/env_flash.c
+++ b/common/env_flash.c
@@ -202,7 +202,7 @@
 	debug (" %08lX ... %08lX ...",
 		(ulong)&(flash_addr_new->data),
 		sizeof(env_ptr->data)+(ulong)&(flash_addr_new->data));
-	if ((rc = flash_write(env_ptr->data,
+	if ((rc = flash_write((char *)env_ptr->data,
 			(ulong)&(flash_addr_new->data),
 			sizeof(env_ptr->data))) ||
 	    (rc = flash_write((char *)&(env_ptr->crc),
@@ -291,7 +291,7 @@
 	ulong	flash_offset;
 	uchar	env_buffer[CFG_ENV_SECT_SIZE];
 #else
-	uchar *env_buffer = (char *)env_ptr;
+	uchar *env_buffer = (uchar *)env_ptr;
 #endif	/* CFG_ENV_SECT_SIZE */
 	int rcode = 0;
 
@@ -337,7 +337,7 @@
 		return 1;
 
 	puts ("Writing to Flash... ");
-	rc = flash_write(env_buffer, flash_sect_addr, len);
+	rc = flash_write((char *)env_buffer, flash_sect_addr, len);
 	if (rc != 0) {
 		flash_perror (rc);
 		rcode = 1;
diff --git a/common/flash.c b/common/flash.c
index 2fb3319..a64bc98 100644
--- a/common/flash.c
+++ b/common/flash.c
@@ -135,7 +135,7 @@
  *			(only some targets require alignment)
  */
 int
-flash_write (uchar *src, ulong addr, ulong cnt)
+flash_write (char *src, ulong addr, ulong cnt)
 {
 #ifdef CONFIG_SPD823TS
 	return (ERR_TIMOUT);	/* any other error codes are possible as well */
@@ -174,7 +174,7 @@
 		len = info->start[0] + info->size - addr;
 		if (len > cnt)
 			len = cnt;
-		if ((i = write_buff(info, src, addr, len)) != 0) {
+		if ((i = write_buff(info, (uchar *)src, addr, len)) != 0) {
 			return (i);
 		}
 		cnt  -= len;
diff --git a/common/fpga.c b/common/fpga.c
index c41c6f8..02d3e42 100644
--- a/common/fpga.c
+++ b/common/fpga.c
@@ -53,8 +53,8 @@
 static fpga_desc desc_table[CONFIG_MAX_FPGA_DEVICES];
 
 /* Local static functions */
-static const fpga_desc * const fpga_get_desc( int devnum );
-static const fpga_desc * const fpga_validate( int devnum, void *buf,
+static __attribute__((__const__)) fpga_desc * __attribute__((__const__)) fpga_get_desc( int devnum );
+static __attribute__((__const__)) fpga_desc * __attribute__((__const__)) fpga_validate( int devnum, void *buf,
 					 size_t bsize, char *fn );
 static int fpga_dev_info( int devnum );
 
@@ -82,7 +82,7 @@
 /* fpga_get_desc
  *	map a device number to a descriptor
  */
-static const fpga_desc * const fpga_get_desc( int devnum )
+static __attribute__((__const__)) fpga_desc * __attribute__((__const__)) fpga_get_desc( int devnum )
 {
 	fpga_desc *desc = (fpga_desc * )NULL;
 
@@ -99,10 +99,10 @@
 /* fpga_validate
  *	generic parameter checking code
  */
-static const fpga_desc * const fpga_validate( int devnum, void *buf,
+static __attribute__((__const__)) fpga_desc * __attribute__((__const__)) fpga_validate( int devnum, void *buf,
 					 size_t bsize, char *fn )
 {
-	const fpga_desc * const desc = fpga_get_desc( devnum );
+	fpga_desc * desc = fpga_get_desc( devnum );
 
 	if ( !desc ) {
 		printf( "%s: Invalid device number %d\n", fn, devnum );
@@ -147,7 +147,7 @@
 			printf( "Altera Device\nDescriptor @ 0x%p\n", desc );
 			ret_val = altera_info( desc->devdesc );
 #else
-			fpga_no_sup( __FUNCTION__, "Altera devices" );
+			fpga_no_sup( (char *)__FUNCTION__, "Altera devices" );
 #endif
 			break;
 		default:
@@ -185,7 +185,7 @@
 #if CONFIG_FPGA & CFG_FPGA_ALTERA
 		ret_val = altera_reloc( desc, reloc_off );
 #else
-		fpga_no_sup( __FUNCTION__, "Altera devices" );
+		fpga_no_sup( (char *)__FUNCTION__, "Altera devices" );
 #endif
 		break;
 	default:
@@ -216,7 +216,7 @@
 /* fpga_count
  * Basic interface function to get the current number of devices available.
  */
-const int fpga_count( void )
+int fpga_count( void )
 {
 	return next_desc;
 }
@@ -263,7 +263,7 @@
 int fpga_load( int devnum, void *buf, size_t bsize )
 {
 	int ret_val = FPGA_FAIL;           /* assume failure */
-	const fpga_desc * const desc = fpga_validate( devnum, buf, bsize, __FUNCTION__ );
+	fpga_desc * desc = fpga_validate( devnum, buf, bsize, (char *)__FUNCTION__ );
 
 	if ( desc ) {
 		switch ( desc->devtype ) {
@@ -278,7 +278,7 @@
 #if CONFIG_FPGA & CFG_FPGA_ALTERA
 			ret_val = altera_load( desc->devdesc, buf, bsize );
 #else
-			fpga_no_sup( __FUNCTION__, "Altera devices" );
+			fpga_no_sup( (char *)__FUNCTION__, "Altera devices" );
 #endif
 			break;
 		default:
@@ -296,7 +296,7 @@
 int fpga_dump( int devnum, void *buf, size_t bsize )
 {
 	int ret_val = FPGA_FAIL;           /* assume failure */
-	const fpga_desc * const desc = fpga_validate( devnum, buf, bsize, __FUNCTION__ );
+	fpga_desc * desc = fpga_validate( devnum, buf, bsize, (char *)__FUNCTION__ );
 
 	if ( desc ) {
 		switch ( desc->devtype ) {
@@ -311,7 +311,7 @@
 #if CONFIG_FPGA & CFG_FPGA_ALTERA
 			ret_val = altera_dump( desc->devdesc, buf, bsize );
 #else
-			fpga_no_sup( __FUNCTION__, "Altera devices" );
+			fpga_no_sup( (char *)__FUNCTION__, "Altera devices" );
 #endif
 			break;
 		default:
diff --git a/common/ft_build.c b/common/ft_build.c
new file mode 100644
index 0000000..624a1e1
--- /dev/null
+++ b/common/ft_build.c
@@ -0,0 +1,695 @@
+/*
+ * OF flat tree builder
+ */
+
+#include <common.h>
+#include <malloc.h>
+#include <environment.h>
+
+#include <asm/errno.h>
+#include <stddef.h>
+
+#include <ft_build.h>
+
+#ifdef CONFIG_OF_FLAT_TREE
+
+/* align addr on a size boundary - adjust address up if needed -- Cort */
+#define _ALIGN(addr,size)       (((addr)+(size)-1)&(~((size)-1)))
+
+static void ft_put_word(struct ft_cxt *cxt, u32 v)
+{
+	if (cxt->overflow)	/* do nothing */
+		return;
+
+	/* check for overflow */
+	if (cxt->p + 4 > cxt->pstr) {
+		cxt->overflow = 1;
+		return;
+	}
+
+	*(u32 *) cxt->p = cpu_to_be32(v);
+	cxt->p += 4;
+}
+
+static inline void ft_put_bin(struct ft_cxt *cxt, const void *data, int sz)
+{
+	u8 *p;
+
+	if (cxt->overflow)	/* do nothing */
+		return;
+
+	/* next pointer pos */
+	p = (u8 *) _ALIGN((unsigned long)cxt->p + sz, 4);
+
+	/* check for overflow */
+	if (p > cxt->pstr) {
+		cxt->overflow = 1;
+		return;
+	}
+
+	memcpy(cxt->p, data, sz);
+	if ((sz & 3) != 0)
+		memset(cxt->p + sz, 0, 4 - (sz & 3));
+	cxt->p = p;
+}
+
+void ft_begin_node(struct ft_cxt *cxt, const char *name)
+{
+	ft_put_word(cxt, OF_DT_BEGIN_NODE);
+	ft_put_bin(cxt, name, strlen(name) + 1);
+}
+
+void ft_end_node(struct ft_cxt *cxt)
+{
+	ft_put_word(cxt, OF_DT_END_NODE);
+}
+
+void ft_nop(struct ft_cxt *cxt)
+{
+	ft_put_word(cxt, OF_DT_NOP);
+}
+
+static int lookup_string(struct ft_cxt *cxt, const char *name)
+{
+	u8 *p;
+
+	p = cxt->pstr;
+	while (p < cxt->pstr_begin) {
+		if (strcmp(p, name) == 0)
+			return p - cxt->p_begin;
+		p += strlen(p) + 1;
+	}
+
+	return -1;
+}
+
+void ft_prop(struct ft_cxt *cxt, const char *name, const void *data, int sz)
+{
+	int len, off;
+
+	if (cxt->overflow)
+		return;
+
+	len = strlen(name) + 1;
+
+	off = lookup_string(cxt, name);
+	if (off == -1) {
+		/* check if we have space */
+		if (cxt->p + 12 + sz + len > cxt->pstr) {
+			cxt->overflow = 1;
+			return;
+		}
+
+		cxt->pstr -= len;
+		memcpy(cxt->pstr, name, len);
+		off = cxt->pstr - cxt->p_begin;
+	}
+
+	/* now put offset from beginning of *STRUCTURE* */
+	/* will be fixed up at the end */
+	ft_put_word(cxt, OF_DT_PROP);
+	ft_put_word(cxt, sz);
+	ft_put_word(cxt, off);
+	ft_put_bin(cxt, data, sz);
+}
+
+void ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str)
+{
+	ft_prop(cxt, name, str, strlen(str) + 1);
+}
+
+void ft_prop_int(struct ft_cxt *cxt, const char *name, int val)
+{
+	u32 v = cpu_to_be32((u32) val);
+
+	ft_prop(cxt, name, &v, 4);
+}
+
+/* start construction of the flat OF tree */
+void ft_begin(struct ft_cxt *cxt, void *blob, int max_size)
+{
+	struct boot_param_header *bph = blob;
+	u32 off;
+
+	/* clear the cxt */
+	memset(cxt, 0, sizeof(*cxt));
+
+	cxt->bph = bph;
+	cxt->max_size = max_size;
+
+	/* zero everything in the header area */
+	memset(bph, 0, sizeof(*bph));
+
+	bph->magic = cpu_to_be32(OF_DT_HEADER);
+	bph->version = cpu_to_be32(0x10);
+	bph->last_comp_version = cpu_to_be32(0x10);
+
+	/* start pointers */
+	cxt->pres_begin = (u8 *) _ALIGN((unsigned long)(bph + 1), 8);
+	cxt->pres = cxt->pres_begin;
+
+	off = (unsigned long)cxt->pres_begin - (unsigned long)bph;
+	bph->off_mem_rsvmap = cpu_to_be32(off);
+
+	((u64 *) cxt->pres)[0] = 0;	/* phys = 0, size = 0, terminate */
+	((u64 *) cxt->pres)[1] = 0;
+
+	cxt->p_anchor = cxt->pres + 16;	/* over the terminator */
+}
+
+/* add a reserver physical area to the rsvmap */
+void ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size)
+{
+	((u64 *) cxt->pres)[0] = cpu_to_be64(physaddr);	/* phys = 0, size = 0, terminate */
+	((u64 *) cxt->pres)[1] = cpu_to_be64(size);
+
+	cxt->pres += 18;	/* advance */
+
+	((u64 *) cxt->pres)[0] = 0;	/* phys = 0, size = 0, terminate */
+	((u64 *) cxt->pres)[1] = 0;
+
+	/* keep track of size */
+	cxt->res_size = cxt->pres + 16 - cxt->pres_begin;
+
+	cxt->p_anchor = cxt->pres + 16;	/* over the terminator */
+}
+
+void ft_begin_tree(struct ft_cxt *cxt)
+{
+	cxt->p_begin = cxt->p_anchor;
+	cxt->pstr_begin = (char *)cxt->bph + cxt->max_size;	/* point at the end */
+
+	cxt->p = cxt->p_begin;
+	cxt->pstr = cxt->pstr_begin;
+}
+
+int ft_end_tree(struct ft_cxt *cxt)
+{
+	struct boot_param_header *bph = cxt->bph;
+	int off, sz, sz1;
+	u32 tag, v;
+	u8 *p;
+
+	ft_put_word(cxt, OF_DT_END);
+
+	if (cxt->overflow)
+		return -ENOMEM;
+
+	/* size of the areas */
+	cxt->struct_size = cxt->p - cxt->p_begin;
+	cxt->strings_size = cxt->pstr_begin - cxt->pstr;
+
+	/* the offset we must move */
+	off = (cxt->pstr_begin - cxt->p_begin) - cxt->strings_size;
+
+	/* the new strings start */
+	cxt->pstr_begin = cxt->p_begin + cxt->struct_size;
+
+	/* move the whole string area */
+	memmove(cxt->pstr_begin, cxt->pstr, cxt->strings_size);
+
+	/* now perform the fixup of the strings */
+	p = cxt->p_begin;
+	while ((tag = be32_to_cpu(*(u32 *) p)) != OF_DT_END) {
+		p += 4;
+
+		if (tag == OF_DT_BEGIN_NODE) {
+			p = (u8 *) _ALIGN((unsigned long)p + strlen(p) + 1, 4);
+			continue;
+		}
+
+		if (tag == OF_DT_END_NODE || tag == OF_DT_NOP)
+			continue;
+
+		if (tag != OF_DT_PROP)
+			return -EINVAL;
+
+		sz = be32_to_cpu(*(u32 *) p);
+		p += 4;
+
+		v = be32_to_cpu(*(u32 *) p);
+		v -= off;
+		*(u32 *) p = cpu_to_be32(v);	/* move down */
+		p += 4;
+
+		p = (u8 *) _ALIGN((unsigned long)p + sz, 4);
+	}
+
+	/* fix sizes */
+	p = (char *)cxt->bph;
+	sz = (cxt->pstr_begin + cxt->strings_size) - p;
+	sz1 = _ALIGN(sz, 16);	/* align at 16 bytes */
+	if (sz != sz1)
+		memset(p + sz, 0, sz1 - sz);
+	bph->totalsize = cpu_to_be32(sz1);
+	bph->off_dt_struct = cpu_to_be32(cxt->p_begin - p);
+	bph->off_dt_strings = cpu_to_be32(cxt->pstr_begin - p);
+
+	/* the new strings start */
+	cxt->pstr_begin = cxt->p_begin + cxt->struct_size;
+	cxt->pstr = cxt->pstr_begin + cxt->strings_size;
+
+	return 0;
+}
+
+/**********************************************************************/
+
+static inline int isprint(int c)
+{
+	return c >= 0x20 && c <= 0x7e;
+}
+
+static int is_printable_string(const void *data, int len)
+{
+	const char *s = data;
+	const char *ss;
+
+	/* zero length is not */
+	if (len == 0)
+		return 0;
+
+	/* must terminate with zero */
+	if (s[len - 1] != '\0')
+		return 0;
+
+	ss = s;
+	while (*s && isprint(*s))
+		s++;
+
+	/* not zero, or not done yet */
+	if (*s != '\0' || (s + 1 - ss) < len)
+		return 0;
+
+	return 1;
+}
+
+static void print_data(const void *data, int len)
+{
+	int i;
+	const u8 *s;
+
+	/* no data, don't print */
+	if (len == 0)
+		return;
+
+	if (is_printable_string(data, len)) {
+		printf(" = \"%s\"", (char *)data);
+		return;
+	}
+
+	switch (len) {
+	case 1:		/* byte */
+		printf(" = <0x%02x>", (*(u8 *) data) & 0xff);
+		break;
+	case 2:		/* half-word */
+		printf(" = <0x%04x>", be16_to_cpu(*(u16 *) data) & 0xffff);
+		break;
+	case 4:		/* word */
+		printf(" = <0x%08x>", be32_to_cpu(*(u32 *) data) & 0xffffffffU);
+		break;
+	case 8:		/* double-word */
+		printf(" = <0x%16llx>", be64_to_cpu(*(uint64_t *) data));
+		break;
+	default:		/* anything else... hexdump */
+		printf(" = [");
+		for (i = 0, s = data; i < len; i++)
+			printf("%02x%s", s[i], i < len - 1 ? " " : "");
+		printf("]");
+
+		break;
+	}
+}
+
+void ft_dump_blob(const void *bphp)
+{
+	const struct boot_param_header *bph = bphp;
+	const uint64_t *p_rsvmap = (const uint64_t *)
+		((const char *)bph + be32_to_cpu(bph->off_mem_rsvmap));
+	const u32 *p_struct = (const u32 *)
+		((const char *)bph + be32_to_cpu(bph->off_dt_struct));
+	const u32 *p_strings = (const u32 *)
+		((const char *)bph + be32_to_cpu(bph->off_dt_strings));
+	u32 tag;
+	const u32 *p;
+	const char *s, *t;
+	int depth, sz, shift;
+	int i;
+	uint64_t addr, size;
+
+	if (be32_to_cpu(bph->magic) != OF_DT_HEADER) {
+		/* not valid tree */
+		return;
+	}
+
+	depth = 0;
+	shift = 4;
+
+	for (i = 0;; i++) {
+		addr = be64_to_cpu(p_rsvmap[i * 2]);
+		size = be64_to_cpu(p_rsvmap[i * 2 + 1]);
+		if (addr == 0 && size == 0)
+			break;
+
+		printf("/memreserve/ 0x%llx 0x%llx;\n", addr, size);
+	}
+
+	p = p_struct;
+	while ((tag = be32_to_cpu(*p++)) != OF_DT_END) {
+
+		/* printf("tag: 0x%08x (%d)\n", tag, p - p_struct); */
+
+		if (tag == OF_DT_BEGIN_NODE) {
+			s = (const char *)p;
+			p = (u32 *) _ALIGN((unsigned long)p + strlen(s) + 1, 4);
+
+			printf("%*s%s {\n", depth * shift, "", s);
+
+			depth++;
+			continue;
+		}
+
+		if (tag == OF_DT_END_NODE) {
+			depth--;
+
+			printf("%*s};\n", depth * shift, "");
+			continue;
+		}
+
+		if (tag == OF_DT_NOP) {
+			printf("%*s[NOP]\n", depth * shift, "");
+			continue;
+		}
+
+		if (tag != OF_DT_PROP) {
+			fprintf(stderr, "%*s ** Unknown tag 0x%08x\n",
+				depth * shift, "", tag);
+			break;
+		}
+		sz = be32_to_cpu(*p++);
+		s = (const char *)p_strings + be32_to_cpu(*p++);
+		t = (const char *)p;
+		p = (const u32 *)_ALIGN((unsigned long)p + sz, 4);
+		printf("%*s%s", depth * shift, "", s);
+		print_data(t, sz);
+		printf(";\n");
+	}
+}
+
+void ft_backtrack_node(struct ft_cxt *cxt)
+{
+	if (be32_to_cpu(*(u32 *) (cxt->p - 4)) != OF_DT_END_NODE)
+		return;		/* XXX only for node */
+
+	cxt->p -= 4;
+}
+
+/* note that the root node of the blob is "peeled" off */
+void ft_merge_blob(struct ft_cxt *cxt, void *blob)
+{
+	struct boot_param_header *bph = (struct boot_param_header *)blob;
+	u32 *p_struct = (u32 *) ((char *)bph + be32_to_cpu(bph->off_dt_struct));
+	u32 *p_strings =
+	    (u32 *) ((char *)bph + be32_to_cpu(bph->off_dt_strings));
+	u32 tag, *p;
+	char *s, *t;
+	int depth, sz;
+
+	if (be32_to_cpu(*(u32 *) (cxt->p - 4)) != OF_DT_END_NODE)
+		return;		/* XXX only for node */
+
+	cxt->p -= 4;
+
+	depth = 0;
+	p = p_struct;
+	while ((tag = be32_to_cpu(*p++)) != OF_DT_END) {
+
+		/* printf("tag: 0x%08x (%d) - %d\n", tag, p - p_struct, depth); */
+
+		if (tag == OF_DT_BEGIN_NODE) {
+			s = (char *)p;
+			p = (u32 *) _ALIGN((unsigned long)p + strlen(s) + 1, 4);
+
+			if (depth++ > 0)
+				ft_begin_node(cxt, s);
+
+			continue;
+		}
+
+		if (tag == OF_DT_END_NODE) {
+			ft_end_node(cxt);
+			if (--depth == 0)
+				break;
+			continue;
+		}
+
+		if (tag == OF_DT_NOP)
+			continue;
+
+		if (tag != OF_DT_PROP)
+			break;
+
+		sz = be32_to_cpu(*p++);
+		s = (char *)p_strings + be32_to_cpu(*p++);
+		t = (char *)p;
+		p = (u32 *) _ALIGN((unsigned long)p + sz, 4);
+
+		ft_prop(cxt, s, t, sz);
+	}
+}
+
+void *ft_get_prop(void *bphp, const char *propname, int *szp)
+{
+	struct boot_param_header *bph = bphp;
+	uint32_t *p_struct =
+	    (uint32_t *) ((char *)bph + be32_to_cpu(bph->off_dt_struct));
+	uint32_t *p_strings =
+	    (uint32_t *) ((char *)bph + be32_to_cpu(bph->off_dt_strings));
+	uint32_t version = be32_to_cpu(bph->version);
+	uint32_t tag;
+	uint32_t *p;
+	char *s, *t;
+	char *ss;
+	int sz;
+	static char path[256], prop[256];
+
+	path[0] = '\0';
+
+	p = p_struct;
+	while ((tag = be32_to_cpu(*p++)) != OF_DT_END) {
+
+		if (tag == OF_DT_BEGIN_NODE) {
+			s = (char *)p;
+			p = (uint32_t *) _ALIGN((unsigned long)p + strlen(s) +
+						1, 4);
+			strcat(path, s);
+			strcat(path, "/");
+			continue;
+		}
+
+		if (tag == OF_DT_END_NODE) {
+			path[strlen(path) - 1] = '\0';
+			ss = strrchr(path, '/');
+			if (ss != NULL)
+				ss[1] = '\0';
+			continue;
+		}
+
+		if (tag == OF_DT_NOP)
+			continue;
+
+		if (tag != OF_DT_PROP)
+			break;
+
+		sz = be32_to_cpu(*p++);
+		s = (char *)p_strings + be32_to_cpu(*p++);
+		if (version < 0x10 && sz >= 8)
+			p = (uint32_t *) _ALIGN((unsigned long)p, 8);
+		t = (char *)p;
+		p = (uint32_t *) _ALIGN((unsigned long)p + sz, 4);
+
+		strcpy(prop, path);
+		strcat(prop, s);
+
+		if (strcmp(prop, propname) == 0) {
+			*szp = sz;
+			return t;
+		}
+	}
+
+	return NULL;
+}
+
+/********************************************************************/
+
+extern unsigned char oftree_dtb[];
+extern unsigned int oftree_dtb_len;
+
+/* Function that returns a character from the environment */
+extern uchar(*env_get_char) (int);
+
+#define BDM(x)	{	.name = #x, .offset = offsetof(bd_t, bi_ ##x ) }
+
+static const struct {
+	const char *name;
+	int offset;
+} bd_map[] = {
+	BDM(memstart),
+	BDM(memsize),
+	BDM(flashstart),
+	BDM(flashsize),
+	BDM(flashoffset),
+	BDM(sramstart),
+	BDM(sramsize),
+#if defined(CONFIG_5xx) || defined(CONFIG_8xx) || defined(CONFIG_8260) \
+	|| defined(CONFIG_E500)
+	BDM(immr_base),
+#endif
+#if defined(CONFIG_MPC5xxx)
+	BDM(mbar_base),
+#endif
+#if defined(CONFIG_MPC83XX)
+	BDM(immrbar),
+#endif
+#if defined(CONFIG_MPC8220)
+	BDM(mbar_base),
+	BDM(inpfreq),
+	BDM(pcifreq),
+	BDM(pevfreq),
+	BDM(flbfreq),
+	BDM(vcofreq),
+#endif
+	BDM(bootflags),
+	BDM(ip_addr),
+	BDM(intfreq),
+	BDM(busfreq),
+#ifdef CONFIG_CPM2
+	BDM(cpmfreq),
+	BDM(brgfreq),
+	BDM(sccfreq),
+	BDM(vco),
+#endif
+#if defined(CONFIG_MPC5xxx)
+	BDM(ipbfreq),
+	BDM(pcifreq),
+#endif
+	BDM(baudrate),
+};
+
+void ft_setup(void *blob, int size, bd_t * bd)
+{
+	DECLARE_GLOBAL_DATA_PTR;
+	u8 *end;
+	u32 *p;
+	int len;
+	struct ft_cxt cxt;
+	int i, k, nxt;
+	static char tmpenv[256];
+	char *s, *lval, *rval;
+	ulong clock;
+	uint32_t v;
+
+	/* disable OF tree; booting old kernel */
+	if (getenv("disable_of") != NULL) {
+		memcpy(blob, bd, sizeof(*bd));
+		return;
+	}
+
+	ft_begin(&cxt, blob, size);
+
+	/* fs_add_rsvmap not used */
+
+	ft_begin_tree(&cxt);
+
+	ft_begin_node(&cxt, "");
+
+	ft_end_node(&cxt);
+
+	/* copy RO tree */
+	ft_merge_blob(&cxt, oftree_dtb);
+
+	/* back into root */
+	ft_backtrack_node(&cxt);
+
+	ft_begin_node(&cxt, "u-boot-env");
+
+	for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
+		for (nxt = i; env_get_char(nxt) != '\0'; ++nxt) ;
+		s = tmpenv;
+		for (k = i; k < nxt && s < &tmpenv[sizeof(tmpenv) - 1]; ++k)
+			*s++ = env_get_char(k);
+		*s++ = '\0';
+		lval = tmpenv;
+		s = strchr(tmpenv, '=');
+		if (s != NULL) {
+			*s++ = '\0';
+			rval = s;
+		} else
+			continue;
+		ft_prop_str(&cxt, lval, rval);
+	}
+
+	ft_end_node(&cxt);
+
+	ft_begin_node(&cxt, "chosen");
+
+	ft_prop_str(&cxt, "name", "chosen");
+	ft_prop_str(&cxt, "bootargs", getenv("bootargs"));
+	ft_prop_int(&cxt, "linux,platform", 0x600);	/* what is this? */
+
+	ft_end_node(&cxt);
+
+	ft_end_node(&cxt);	/* end root */
+
+	ft_end_tree(&cxt);
+
+	/*
+	   printf("merged OF-tree\n");
+	   ft_dump_blob(blob);
+	 */
+
+	/* paste the bd_t at the end of the flat tree */
+	end = (char *)blob +
+	    be32_to_cpu(((struct boot_param_header *)blob)->totalsize);
+	memcpy(end, bd, sizeof(*bd));
+
+#ifdef CONFIG_PPC
+
+	for (i = 0; i < sizeof(bd_map)/sizeof(bd_map[0]); i++) {
+		sprintf(tmpenv, "/bd_t/%s", bd_map[i].name);
+		v = *(uint32_t *)((char *)bd + bd_map[i].offset);
+
+		p = ft_get_prop(blob, tmpenv, &len);
+		if (p != NULL)
+			*p = cpu_to_be32(v);
+	}
+
+	p = ft_get_prop(blob, "/bd_t/enetaddr", &len);
+	if (p != NULL)
+		memcpy(p, bd->bi_enetaddr, 6);
+
+	p = ft_get_prop(blob, "/bd_t/ethspeed", &len);
+	if (p != NULL)
+		*p = cpu_to_be32((uint32_t) bd->bi_ethspeed);
+
+	clock = bd->bi_intfreq;
+	p = ft_get_prop(blob, "/cpus/" OF_CPU "/clock-frequency", &len);
+	if (p != NULL)
+		*p = cpu_to_be32(clock);
+
+#ifdef OF_TBCLK
+	clock = OF_TBCLK;
+	p = ft_get_prop(blob, "/cpus/" OF_CPU "/timebase-frequency", &len);
+	if (p != NULL)
+		*p = cpu_to_be32(OF_TBCLK);
+#endif
+
+#endif				/* __powerpc__ */
+
+	/*
+	   printf("final OF-tree\n");
+	   ft_dump_blob(blob);
+	 */
+
+}
+
+#endif
diff --git a/common/hush.c b/common/hush.c
index c10b117..bb5041a 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -296,7 +296,7 @@
 #endif
 
 /* "globals" within this file */
-static char *ifs;
+static uchar *ifs;
 static char map[256];
 #ifndef __U_BOOT__
 static int fake_mode;
@@ -3134,8 +3134,8 @@
 void update_ifs_map(void)
 {
 	/* char *ifs and char map[256] are both globals. */
-	ifs = getenv("IFS");
-	if (ifs == NULL) ifs=" \t\n";
+	ifs = (uchar *)getenv("IFS");
+	if (ifs == NULL) ifs=(uchar *)" \t\n";
 	/* Precompute a list of 'flow through' behavior so it can be treated
 	 * quickly up front.  Computation is necessary because of IFS.
 	 * Special case handling of IFS == " \t\n" is not implemented.
@@ -3144,11 +3144,11 @@
 	 */
 	memset(map,0,sizeof(map)); /* most characters flow through always */
 #ifndef __U_BOOT__
-	mapset("\\$'\"`", 3);      /* never flow through */
-	mapset("<>;&|(){}#", 1);   /* flow through if quoted */
+	mapset((uchar *)"\\$'\"`", 3);      /* never flow through */
+	mapset((uchar *)"<>;&|(){}#", 1);   /* flow through if quoted */
 #else
-	mapset("\\$'\"", 3);       /* never flow through */
-	mapset(";&|#", 1);         /* flow through if quoted */
+	mapset((uchar *)"\\$'\"", 3);       /* never flow through */
+	mapset((uchar *)";&|#", 1);         /* flow through if quoted */
 #endif
 	mapset(ifs, 2);            /* also flow through if quoted */
 }
@@ -3168,7 +3168,7 @@
 		ctx.type = flag;
 		initialize_context(&ctx);
 		update_ifs_map();
-		if (!(flag & FLAG_PARSE_SEMICOLON) || (flag & FLAG_REPARSING)) mapset(";$&|", 0);
+		if (!(flag & FLAG_PARSE_SEMICOLON) || (flag & FLAG_REPARSING)) mapset((uchar *)";$&|", 0);
 		inp->promptmode=1;
 		rcode = parse_stream(&temp, &ctx, inp, '\n');
 #ifdef __U_BOOT__
diff --git a/common/kgdb.c b/common/kgdb.c
index 06adb3e..6de6ec9 100644
--- a/common/kgdb.c
+++ b/common/kgdb.c
@@ -144,7 +144,7 @@
 	}
 	*buf = 0;
 	longjmp_on_fault = 0;
-	return buf;
+	return (unsigned char *)buf;
 }
 
 /* convert the hex array pointed to by buf into binary to be placed in mem
@@ -353,7 +353,7 @@
 		*ptr++ = hexchars[rp->num >> 4];
 		*ptr++ = hexchars[rp->num & 0xf];
 		*ptr++ = ':';
-		ptr = mem2hex((char *)&rp->val, ptr, 4);
+		ptr = (char *)mem2hex((char *)&rp->val, ptr, 4);
 		*ptr++ = ';';
 	}
 
@@ -364,7 +364,7 @@
 		printf("kgdb: remcomOutBuffer: %s\n", remcomOutBuffer);
 #endif
 
-	putpacket(remcomOutBuffer);
+	putpacket((unsigned char *)&remcomOutBuffer);
 
 	while (1) {
 		volatile int errnum;
@@ -508,7 +508,7 @@
 #endif
 
 		/* reply to the request */
-		putpacket(remcomOutBuffer);
+		putpacket((unsigned char *)&remcomOutBuffer);
 
 	} /* while(1) */
 }
@@ -548,7 +548,7 @@
 
 	buffer[0] = 'O';
 	mem2hex ((char *)s, &buffer[1], count);
-	putpacket(buffer);
+	putpacket((unsigned char *)&buffer);
 
 	return 1;
 }
diff --git a/common/lcd.c b/common/lcd.c
index 7bf7a63..e64972f 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -279,9 +279,9 @@
 static inline void lcd_puts_xy (ushort x, ushort y, uchar *s)
 {
 #if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
-	lcd_drawchars (x, y+BMP_LOGO_HEIGHT, s, strlen (s));
+	lcd_drawchars (x, y+BMP_LOGO_HEIGHT, s, strlen ((char *)s));
 #else
-	lcd_drawchars (x, y, s, strlen (s));
+	lcd_drawchars (x, y, s, strlen ((char *)s));
 #endif
 }
 
@@ -526,7 +526,7 @@
 		sizeof(bmp_logo_palette)/(sizeof(ushort)));
 
 	bmap = &bmp_logo_bitmap[0];
-	fb   = (char *)(lcd_base + y * lcd_line_length + x);
+	fb   = (uchar *)(lcd_base + y * lcd_line_length + x);
 
 	if (NBITS(panel_info.vl_bpix) < 12) {
 		/* Leave room for default color map */
@@ -710,15 +710,15 @@
 #ifdef CONFIG_MPC823
 # ifdef CONFIG_LCD_INFO
 	sprintf (info, "%s (%s - %s) ", U_BOOT_VERSION, __DATE__, __TIME__);
-	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, info, strlen(info));
+	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y, (uchar *)info, strlen(info));
 
 	sprintf (info, "(C) 2004 DENX Software Engineering");
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT,
-					info, strlen(info));
+					(uchar *)info, strlen(info));
 
 	sprintf (info, "    Wolfgang DENK, wd@denx.de");
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 2,
-					info, strlen(info));
+					(uchar *)info, strlen(info));
 #  ifdef CONFIG_LCD_INFO_BELOW_LOGO
 	sprintf (info, "MPC823 CPU at %s MHz",
 		strmhz(temp, gd->cpu_clk));
@@ -737,7 +737,7 @@
 		gd->ram_size >> 20,
 		gd->bd->bi_flashsize >> 20 );
 	lcd_drawchars (LCD_INFO_X, LCD_INFO_Y + VIDEO_FONT_HEIGHT * 4,
-					info, strlen(info));
+					(uchar *)info, strlen(info));
 
 #  endif /* CONFIG_LCD_INFO_BELOW_LOGO */
 # endif /* CONFIG_LCD_INFO */
diff --git a/common/main.c b/common/main.c
index 1389958..f042f3a 100644
--- a/common/main.c
+++ b/common/main.c
@@ -347,7 +347,7 @@
 #ifdef CONFIG_MODEM_SUPPORT
 	debug ("DEBUG: main_loop:   do_mdm_init=%d\n", do_mdm_init);
 	if (do_mdm_init) {
-		uchar *str = strdup(getenv("mdm_cmd"));
+		char *str = strdup(getenv("mdm_cmd"));
 		setenv ("preboot", str);  /* set or delete definition */
 		if (str != NULL)
 			free (str);
diff --git a/common/soft_i2c.c b/common/soft_i2c.c
index f7ca498..3d0e08c 100644
--- a/common/soft_i2c.c
+++ b/common/soft_i2c.c
@@ -399,7 +399,7 @@
  */
 uchar i2c_reg_read(uchar i2c_addr, uchar reg)
 {
-	char buf;
+	uchar buf;
 
 	i2c_read(i2c_addr, reg, 1, &buf, 1);
 
diff --git a/common/usb_storage.c b/common/usb_storage.c
index 69d195a..99e4ab0 100644
--- a/common/usb_storage.c
+++ b/common/usb_storage.c
@@ -490,7 +490,7 @@
  */
 int usb_stor_CB_comdat(ccb *srb, struct us_data *us)
 {
-	int result;
+	int result = 0;
 	int dir_in,retry;
 	unsigned int pipe;
 	unsigned long status;
@@ -528,7 +528,7 @@
 
 		USB_STOR_PRINTF("CB_transport: control msg returned %d, direction is %s to go 0x%lx\n",result,dir_in ? "IN" : "OUT",srb->datalen);
 		if (srb->datalen) {
-			result = us_one_transfer(us, pipe, srb->pdata,srb->datalen);
+			result = us_one_transfer(us, pipe, (char *)srb->pdata,srb->datalen);
 			USB_STOR_PRINTF("CBI attempted to transfer data, result is %d status %lX, len %d\n", result,us->pusb_dev->status,us->pusb_dev->act_len);
 			if(!(us->pusb_dev->status & USB_ST_NAK_REC))
 				break;
@@ -847,7 +847,7 @@
 {
 	char *ptr;
 
-	ptr=srb->pdata;
+	ptr=(char *)srb->pdata;
 	memset(&srb->cmd[0],0,12);
 	srb->cmd[0]=SCSI_REQ_SENSE;
 	srb->cmd[1]=srb->lun<<5;
@@ -857,7 +857,7 @@
 	srb->cmdlen=12;
 	ss->transport(srb,ss);
 	USB_STOR_PRINTF("Request Sense returned %02X %02X %02X\n",srb->sense_buf[2],srb->sense_buf[12],srb->sense_buf[13]);
-	srb->pdata=ptr;
+	srb->pdata=(uchar *)ptr;
 	return 0;
 }
 
diff --git a/common/xilinx.c b/common/xilinx.c
index 40ce3bc..e03e78c 100644
--- a/common/xilinx.c
+++ b/common/xilinx.c
@@ -54,7 +54,7 @@
 {
 	int ret_val = FPGA_FAIL;	/* assume a failure */
 
-	if (!xilinx_validate (desc, __FUNCTION__)) {
+	if (!xilinx_validate (desc, (char *)__FUNCTION__)) {
 		printf ("%s: Invalid device descriptor\n", __FUNCTION__);
 	} else
 		switch (desc->family) {
@@ -101,7 +101,7 @@
 {
 	int ret_val = FPGA_FAIL;	/* assume a failure */
 
-	if (!xilinx_validate (desc, __FUNCTION__)) {
+	if (!xilinx_validate (desc, (char *)__FUNCTION__)) {
 		printf ("%s: Invalid device descriptor\n", __FUNCTION__);
 	} else
 		switch (desc->family) {
@@ -148,7 +148,7 @@
 {
 	int ret_val = FPGA_FAIL;
 
-	if (xilinx_validate (desc, __FUNCTION__)) {
+	if (xilinx_validate (desc, (char *)__FUNCTION__)) {
 		printf ("Family:        \t");
 		switch (desc->family) {
 		case Xilinx_Spartan2:
@@ -244,7 +244,7 @@
 {
 	int ret_val = FPGA_FAIL;	/* assume a failure */
 
-	if (!xilinx_validate (desc, __FUNCTION__)) {
+	if (!xilinx_validate (desc, (char *)__FUNCTION__)) {
 		printf ("%s: Invalid device descriptor\n", __FUNCTION__);
 	} else
 		switch (desc->family) {
diff --git a/cpu/arm920t/at91rm9200/ether.c b/cpu/arm920t/at91rm9200/ether.c
index d88517f..ca5b7d1 100644
--- a/cpu/arm920t/at91rm9200/ether.c
+++ b/cpu/arm920t/at91rm9200/ether.c
@@ -184,7 +184,7 @@
 
 	/* Init Ehternet buffers */
 	for (i = 0; i < RBF_FRAMEMAX; i++) {
-		rbfdt[i].addr = rbf_framebuf[i];
+		rbfdt[i].addr = (unsigned long)rbf_framebuf[i];
 		rbfdt[i].size = 0;
 	}
 	rbfdt[RBF_FRAMEMAX - 1].addr |= RBF_WRAP;
diff --git a/cpu/mpc5xxx/fec.c b/cpu/mpc5xxx/fec.c
index c3d30a0..eadb7ec 100644
--- a/cpu/mpc5xxx/fec.c
+++ b/cpu/mpc5xxx/fec.c
@@ -320,7 +320,7 @@
 	 * Set individual address filter for unicast address
 	 * and set physical address registers.
 	 */
-	mpc5xxx_fec_set_hwaddr(fec, dev->enetaddr);
+	mpc5xxx_fec_set_hwaddr(fec, (char *)dev->enetaddr);
 
 	/*
 	 * Set multicast address filter
@@ -785,7 +785,7 @@
 	unsigned long ievent;
 	int frame_length, len = 0;
 	NBUF *frame;
-	char buff[FEC_MAX_PKT_SIZE];
+	uchar buff[FEC_MAX_PKT_SIZE];
 
 #if (DEBUG & 0x1)
 	printf ("mpc5xxx_fec_recv %d Start...\n", fec->rbdIndex);
diff --git a/cpu/mpc5xxx/i2c.c b/cpu/mpc5xxx/i2c.c
index 845f7c0..044db46 100644
--- a/cpu/mpc5xxx/i2c.c
+++ b/cpu/mpc5xxx/i2c.c
@@ -55,8 +55,9 @@
 
 static int mpc_reg_in(volatile u32 *reg)
 {
-	return *reg >> 24;
+	int ret = *reg >> 24;
 	__asm__ __volatile__ ("eieio");
+	return ret;
 }
 
 static void mpc_reg_out(volatile u32 *reg, int val, int mask)
@@ -298,7 +299,7 @@
 
 int i2c_read(uchar chip, uint addr, int alen, uchar *buf, int len)
 {
-	uchar                xaddr[4];
+	char                xaddr[4];
 	struct mpc5xxx_i2c * regs        = (struct mpc5xxx_i2c *)I2C_BASE;
 	int                  ret         = -1;
 
@@ -329,7 +330,7 @@
 		goto Done;
 	}
 
-	if (receive_bytes(chip, buf, len)) {
+	if (receive_bytes(chip, (char *)buf, len)) {
 		printf("i2c_read: receive_bytes failed\n");
 		goto Done;
 	}
@@ -342,7 +343,7 @@
 
 int i2c_write(uchar chip, uint addr, int alen, uchar *buf, int len)
 {
-	uchar               xaddr[4];
+	char               xaddr[4];
 	struct mpc5xxx_i2c *regs        = (struct mpc5xxx_i2c *)I2C_BASE;
 	int                 ret         = -1;
 
@@ -367,7 +368,7 @@
 		goto Done;
 	}
 
-	if (send_bytes(chip, buf, len)) {
+	if (send_bytes(chip, (char *)buf, len)) {
 		printf("i2c_write: send_bytes failed\n");
 		goto Done;
 	}
@@ -380,7 +381,7 @@
 
 uchar i2c_reg_read(uchar chip, uchar reg)
 {
-	char buf;
+	uchar buf;
 
 	i2c_read(chip, reg, 1, &buf, 1);
 
diff --git a/cpu/mpc8220/fec.c b/cpu/mpc8220/fec.c
index e974ab3..d5cd22e 100644
--- a/cpu/mpc8220/fec.c
+++ b/cpu/mpc8220/fec.c
@@ -330,7 +330,7 @@
 	 * Set individual address filter for unicast address
 	 * and set physical address registers.
 	 */
-	mpc8220_fec_set_hwaddr (fec, dev->enetaddr);
+	mpc8220_fec_set_hwaddr (fec, (char *)(dev->enetaddr));
 
 	/*
 	 * Set multicast address filter
diff --git a/cpu/mpc8220/i2c.c b/cpu/mpc8220/i2c.c
index e9d0771..62f7c0f 100644
--- a/cpu/mpc8220/i2c.c
+++ b/cpu/mpc8220/i2c.c
@@ -73,8 +73,10 @@
 
 static int mpc_reg_in (volatile u32 * reg)
 {
-	return *reg >> 24;
+	int ret;
+	ret = *reg >> 24;
 	__asm__ __volatile__ ("eieio");
+	return ret;
 }
 
 static void mpc_reg_out (volatile u32 * reg, int val, int mask)
@@ -324,7 +326,7 @@
 		goto Done;
 	}
 
-	if (send_bytes (chip, &xaddr[4 - alen], alen)) {
+	if (send_bytes (chip, (char *)&xaddr[4 - alen], alen)) {
 		printf ("i2c_read: send_bytes failed\n");
 		goto Done;
 	}
@@ -335,7 +337,7 @@
 		goto Done;
 	}
 
-	if (receive_bytes (chip, buf, len)) {
+	if (receive_bytes (chip, (char *)buf, len)) {
 		printf ("i2c_read: receive_bytes failed\n");
 		goto Done;
 	}
@@ -368,12 +370,12 @@
 		goto Done;
 	}
 
-	if (send_bytes (chip, &xaddr[4 - alen], alen)) {
+	if (send_bytes (chip, (char *)&xaddr[4 - alen], alen)) {
 		printf ("i2c_write: send_bytes failed\n");
 		goto Done;
 	}
 
-	if (send_bytes (chip, buf, len)) {
+	if (send_bytes (chip, (char *)buf, len)) {
 		printf ("i2c_write: send_bytes failed\n");
 		goto Done;
 	}
@@ -386,7 +388,7 @@
 
 uchar i2c_reg_read (uchar chip, uchar reg)
 {
-	char buf;
+	uchar buf;
 
 	i2c_read (chip, reg, 1, &buf, 1);
 
diff --git a/cpu/mpc824x/drivers/i2c/i2c.c b/cpu/mpc824x/drivers/i2c/i2c.c
index 7445a1c..3add687 100644
--- a/cpu/mpc824x/drivers/i2c/i2c.c
+++ b/cpu/mpc824x/drivers/i2c/i2c.c
@@ -264,12 +264,12 @@
 	 * and looking for an <ACK> back.
 	 */
 	udelay (10000);
-	return i2c_read (chip, 0, 1, (char *) &tmp, 1);
+	return i2c_read (chip, 0, 1, (uchar *) &tmp, 1);
 }
 
 uchar i2c_reg_read (uchar i2c_addr, uchar reg)
 {
-	char buf[1];
+	uchar buf[1];
 
 	i2c_read (i2c_addr, reg, 1, buf, 1);
 
diff --git a/cpu/mpc8260/i2c.c b/cpu/mpc8260/i2c.c
index e0ac684..ea97ab8 100644
--- a/cpu/mpc8260/i2c.c
+++ b/cpu/mpc8260/i2c.c
@@ -752,7 +752,7 @@
 uchar
 i2c_reg_read(uchar chip, uchar reg)
 {
-	char buf;
+	uchar buf;
 
 	i2c_read(chip, reg, 1, &buf, 1);
 
diff --git a/cpu/mpc83xx/i2c.c b/cpu/mpc83xx/i2c.c
index 7ccb8a9..4e70f80 100644
--- a/cpu/mpc83xx/i2c.c
+++ b/cpu/mpc83xx/i2c.c
@@ -233,12 +233,12 @@
 	 * and looking for an <ACK> back.
 	 */
 	udelay(10000);
-	return i2c_read (chip, 0, 1, (char *)&tmp, 1);
+	return i2c_read (chip, 0, 1, (uchar *)&tmp, 1);
 }
 
 uchar i2c_reg_read (uchar i2c_addr, uchar reg)
 {
-	char buf[1];
+	uchar buf[1];
 
 	i2c_read (i2c_addr, reg, 1, buf, 1);
 
diff --git a/cpu/mpc85xx/i2c.c b/cpu/mpc85xx/i2c.c
index 2d08487..32dcf5d 100644
--- a/cpu/mpc85xx/i2c.c
+++ b/cpu/mpc85xx/i2c.c
@@ -245,12 +245,12 @@
 	 * and looking for an <ACK> back.
 	 */
 	udelay(10000);
-	return i2c_read (chip, 0, 1, (char *)&tmp, 1);
+	return i2c_read (chip, 0, 1, (uchar *)&tmp, 1);
 }
 
 uchar i2c_reg_read (uchar i2c_addr, uchar reg)
 {
-	char buf[1];
+	uchar buf[1];
 
 	i2c_read (i2c_addr, reg, 1, buf, 1);
 
diff --git a/cpu/mpc8xx/config.mk b/cpu/mpc8xx/config.mk
index bfa6625..5fa150e 100644
--- a/cpu/mpc8xx/config.mk
+++ b/cpu/mpc8xx/config.mk
@@ -21,6 +21,6 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing
+PLATFORM_RELFLAGS += -fPIC -ffixed-r14 -meabi -fno-strict-aliasing 
 
 PLATFORM_CPPFLAGS += -DCONFIG_8xx -ffixed-r2 -ffixed-r29 -mstring -mcpu=860 -msoft-float
diff --git a/cpu/mpc8xx/i2c.c b/cpu/mpc8xx/i2c.c
index baa3552..682db53 100644
--- a/cpu/mpc8xx/i2c.c
+++ b/cpu/mpc8xx/i2c.c
@@ -724,7 +724,7 @@
 uchar
 i2c_reg_read(uchar i2c_addr, uchar reg)
 {
-	char buf;
+	uchar buf;
 
 	i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE);
 
diff --git a/cpu/mpc8xx/spi.c b/cpu/mpc8xx/spi.c
index 9213d10..e318ed0 100644
--- a/cpu/mpc8xx/spi.c
+++ b/cpu/mpc8xx/spi.c
@@ -525,11 +525,11 @@
 
 	for (i = 0; i < TEST_NUM; i++) {
 		for (l = TEST_MIN_LENGTH; l <= TEST_MAX_LENGTH; l += 8) {
-			packet_fill (txbuf, l);
+			packet_fill ((char *)txbuf, l);
 
 			spi_xfer (l);
 
-			if (packet_check (rxbuf, l) < 0) {
+			if (packet_check ((char *)rxbuf, l) < 0) {
 				goto Done;
 			}
 		}
diff --git a/cpu/mpc8xx/video.c b/cpu/mpc8xx/video.c
index f2b8814..ee60477 100644
--- a/cpu/mpc8xx/video.c
+++ b/cpu/mpc8xx/video.c
@@ -447,9 +447,9 @@
 	}
 }
 
-static inline void video_drawstring (int xx, int yy, unsigned char *s)
+static inline void video_drawstring (int xx, int yy, char *s)
 {
-	video_drawchars (xx, yy, s, strlen (s));
+	video_drawchars (xx, yy, (unsigned char *)s, strlen (s));
 }
 
 /* Relative to console plotting functions */
@@ -474,7 +474,7 @@
 
 static inline void video_putstring (int xx, int yy, unsigned char *s)
 {
-	video_putchars (xx, yy, s, strlen (s));
+	video_putchars (xx, yy, (unsigned char *)s, strlen ((char *)s));
 }
 
 /************************************************************************/
diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c
index 34f6e97..d3f1de4 100644
--- a/cpu/ppc4xx/4xx_enet.c
+++ b/cpu/ppc4xx/4xx_enet.c
@@ -139,7 +139,7 @@
 static uint32_t mal_ier;
 
 #if !defined(CONFIG_NET_MULTI)
-struct eth_device *emac0_dev;
+struct eth_device *emac0_dev = NULL;
 #endif
 
 
@@ -306,8 +306,10 @@
 
 	/* before doing anything, figure out if we have a MAC address */
 	/* if not, bail */
-	if (memcmp (dev->enetaddr, "\0\0\0\0\0\0", 6) == 0)
+	if (memcmp (dev->enetaddr, "\0\0\0\0\0\0", 6) == 0) {
+		printf("ERROR: ethaddr not set!\n");
 		return -1;
+	}
 
 #if defined(CONFIG_440GX)
 	/* Need to get the OPB frequency so we can access the PHY */
@@ -1486,12 +1488,16 @@
 int eth_init (bd_t *bis)
 {
 	ppc_4xx_eth_initialize(bis);
-	return(ppc_4xx_eth_init(emac0_dev, bis));
+	if (emac0_dev) {
+		return ppc_4xx_eth_init(emac0_dev, bis);
+	} else {
+		printf("ERROR: ethaddr not set!\n");
+		return -1;
+	}
 }
 
 int eth_send(volatile void *packet, int length)
 {
-
 	return (ppc_4xx_eth_send(emac0_dev, packet, length));
 }
 
diff --git a/cpu/ppc4xx/i2c.c b/cpu/ppc4xx/i2c.c
index 3a644a4..be94b57 100644
--- a/cpu/ppc4xx/i2c.c
+++ b/cpu/ppc4xx/i2c.c
@@ -428,7 +428,7 @@
  */
 uchar i2c_reg_read(uchar i2c_addr, uchar reg)
 {
-	char buf;
+	uchar buf;
 
 	i2c_read(i2c_addr, reg, 1, &buf, 1);
 
diff --git a/cpu/ppc4xx/spd_sdram.c b/cpu/ppc4xx/spd_sdram.c
index 48102ef..7c9ac25 100644
--- a/cpu/ppc4xx/spd_sdram.c
+++ b/cpu/ppc4xx/spd_sdram.c
@@ -456,7 +456,7 @@
 
 int spd_read(uint addr)
 {
-	char data[2];
+	uchar data[2];
 
 	if (i2c_read(SPD_EEPROM_ADDRESS, addr, 1, data, 1) == 0)
 		return (int)data[0];
diff --git a/disk/part_dos.c b/disk/part_dos.c
index a37c32d..133ee79 100644
--- a/disk/part_dos.c
+++ b/disk/part_dos.c
@@ -75,7 +75,7 @@
 	    (buffer[DOS_PART_MAGIC_OFFSET + 1] != 0xaa) ) {
 		return (-1);
 	} /* no DOS Signature at all */
-	if(strncmp(&buffer[DOS_PBR_FSTYPE_OFFSET],"FAT",3)==0)
+	if(strncmp((char *)&buffer[DOS_PBR_FSTYPE_OFFSET],"FAT",3)==0)
 		return DOS_PBR; /* is PBR */
 	return DOS_MBR;	    /* Is MBR */
 }
@@ -195,23 +195,23 @@
 			switch(dev_desc->if_type) {
 				case IF_TYPE_IDE:
 				case IF_TYPE_ATAPI:
-					sprintf (info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num);
+					sprintf ((char *)info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num);
 					break;
 				case IF_TYPE_SCSI:
-					sprintf (info->name, "sd%c%d\n", 'a' + dev_desc->dev, part_num);
+					sprintf ((char *)info->name, "sd%c%d\n", 'a' + dev_desc->dev, part_num);
 					break;
 				case IF_TYPE_USB:
-					sprintf (info->name, "usbd%c%d\n", 'a' + dev_desc->dev, part_num);
+					sprintf ((char *)info->name, "usbd%c%d\n", 'a' + dev_desc->dev, part_num);
 					break;
 				case IF_TYPE_DOC:
-					sprintf (info->name, "docd%c%d\n", 'a' + dev_desc->dev, part_num);
+					sprintf ((char *)info->name, "docd%c%d\n", 'a' + dev_desc->dev, part_num);
 					break;
 				default:
-					sprintf (info->name, "xx%c%d\n", 'a' + dev_desc->dev, part_num);
+					sprintf ((char *)info->name, "xx%c%d\n", 'a' + dev_desc->dev, part_num);
 					break;
 			}
 			/* sprintf(info->type, "%d, pt->sys_ind); */
-			sprintf (info->type, "U-Boot");
+			sprintf ((char *)info->type, "U-Boot");
 			return 0;
 		}
 
diff --git a/disk/part_iso.c b/disk/part_iso.c
index ee8c7c6..0735324 100644
--- a/disk/part_iso.c
+++ b/disk/part_iso.c
@@ -87,7 +87,7 @@
 				dev_desc->dev, part_num);
 		return (-1);
 	}
-	if(strncmp(ppr->stand_ident,"CD001",5)!=0) {
+	if(strncmp((char *)ppr->stand_ident,"CD001",5)!=0) {
 		if(verb)
 			printf ("** Wrong ISO Ident: %s on %d:%d **\n",
 				ppr->stand_ident,dev_desc->dev, part_num);
@@ -154,23 +154,23 @@
 	/* the validation entry seems to be ok, now search the "partition" */
 	entry_num=0;
 	offset=0x20;
-	sprintf (info->type, "U-Boot");
+	sprintf ((char *)info->type, "U-Boot");
 	switch(dev_desc->if_type) {
 		case IF_TYPE_IDE:
 		case IF_TYPE_ATAPI:
-			sprintf (info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num);
+			sprintf ((char *)info->name, "hd%c%d\n", 'a' + dev_desc->dev, part_num);
 			break;
 		case IF_TYPE_SCSI:
-			sprintf (info->name, "sd%c%d\n", 'a' + dev_desc->dev, part_num);
+			sprintf ((char *)info->name, "sd%c%d\n", 'a' + dev_desc->dev, part_num);
 			break;
 		case IF_TYPE_USB:
-			sprintf (info->name, "usbd%c%d\n", 'a' + dev_desc->dev, part_num);
+			sprintf ((char *)info->name, "usbd%c%d\n", 'a' + dev_desc->dev, part_num);
 			break;
 		case IF_TYPE_DOC:
-			sprintf (info->name, "docd%c%d\n", 'a' + dev_desc->dev, part_num);
+			sprintf ((char *)info->name, "docd%c%d\n", 'a' + dev_desc->dev, part_num);
 			break;
 		default:
-			sprintf (info->name, "xx%c%d\n", 'a' + dev_desc->dev, part_num);
+			sprintf ((char *)info->name, "xx%c%d\n", 'a' + dev_desc->dev, part_num);
 			break;
 	}
 	/* the bootcatalog (including validation Entry) is limited to 2048Bytes
diff --git a/doc/README.OFT b/doc/README.OFT
new file mode 100644
index 0000000..8f00ebb
--- /dev/null
+++ b/doc/README.OFT
@@ -0,0 +1,28 @@
+Open Firmware Flat Tree and usage.
+----------------------------------
+
+As part of the ongoing cleanup of the Linux PPC trees, the preferred
+way to pass bootloader and board setup information is the open
+firmware flat tree.
+
+Please take a look at the following email discussion for some 
+background.
+
+  http://ozlabs.org/pipermail/linuxppc-dev/2005-August/019408.html
+  http://ozlabs.org/pipermail/linuxppc-dev/2005-August/019362.html
+
+The generated tree is part static and part dynamic.
+
+There is a static part which is compiled in with DTC and a dynamic
+part which is programmatically appended.
+
+You'll need a fairly recent DTC tool, which is available by git at
+
+  rsync://ozlabs.org/dtc/dtc.git
+
+The xxd binary dumper is needed too which I got from
+
+  ftp://ftp.uni-erlangen.de/pub/utilities/etc/xxd-1.10.tar.gz
+
+
+Pantelis Antoniou, 13 Oct 2005
diff --git a/drivers/cfb_console.c b/drivers/cfb_console.c
index aba4a03..9727aeb 100644
--- a/drivers/cfb_console.c
+++ b/drivers/cfb_console.c
@@ -501,7 +501,7 @@
 
 static inline void video_drawstring (int xx, int yy, unsigned char *s)
 {
-	video_drawchars (xx, yy, s, strlen (s));
+	video_drawchars (xx, yy, s, strlen ((char *)s));
 }
 
 /*****************************************************************************/
@@ -548,12 +548,12 @@
 		sprintf (info, " %02d:%02d:%02d ", tm.tm_hour, tm.tm_min,
 			 tm.tm_sec);
 		video_drawstring (VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
-				  VIDEO_INFO_Y, info);
+				  VIDEO_INFO_Y, (uchar *)info);
 
 		sprintf (info, "%02d.%02d.%04d", tm.tm_mday, tm.tm_mon,
 			 tm.tm_year);
 		video_drawstring (VIDEO_VISIBLE_COLS - 10 * VIDEO_FONT_WIDTH,
-				  VIDEO_INFO_Y + 1 * VIDEO_FONT_HEIGHT, info);
+				  VIDEO_INFO_Y + 1 * VIDEO_FONT_HEIGHT, (uchar *)info);
 	}
 #endif
 
@@ -779,11 +779,18 @@
 		 */
 		len = CFG_VIDEO_LOGO_MAX_SIZE;
 		dst = malloc(CFG_VIDEO_LOGO_MAX_SIZE);
+		if (dst == NULL) {
+			printf("Error: malloc in gunzip failed!\n");
+			return(1);
+		}
 		if (gunzip(dst, CFG_VIDEO_LOGO_MAX_SIZE, (uchar *)bmp_image, &len) != 0) {
 			printf ("Error: no valid bmp or bmp.gz image at %lx\n", bmp_image);
 			free(dst);
 			return 1;
 		}
+		if (len == CFG_VIDEO_LOGO_MAX_SIZE) {
+			printf("Image could be truncated (increase CFG_VIDEO_LOGO_MAX_SIZE)!\n");
+		}
 
 		/*
 		 * Set addr to decompressed image
@@ -1112,7 +1119,7 @@
 	logo_plot (video_fb_address, VIDEO_COLS, 0, 0);
 
 	sprintf (info, " %s", &version_string);
-	video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, info);
+	video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *)info);
 
 #ifdef CONFIG_CONSOLE_EXTRA_INFO
 	{
@@ -1123,7 +1130,7 @@
 			if (*info)
 				video_drawstring (VIDEO_INFO_X,
 						  VIDEO_INFO_Y + i * VIDEO_FONT_HEIGHT,
-						  info);
+						  (uchar *)info);
 		}
 	}
 #endif
diff --git a/drivers/dc2114x.c b/drivers/dc2114x.c
index 5386d92..c43cd5e 100644
--- a/drivers/dc2114x.c
+++ b/drivers/dc2114x.c
@@ -214,7 +214,7 @@
 {
 	int             	idx=0;
 	int             	card_number = 0;
-	int             	cfrv;
+	unsigned int           	cfrv;
 	unsigned char   	timer;
 	pci_dev_t		devbusfn;
 	unsigned int		iobase;
@@ -708,7 +708,7 @@
 #ifndef CONFIG_TULIP_FIX_DAVICOM
 static void read_hw_addr(struct eth_device *dev, bd_t *bis)
 {
-	u_short tmp, *p = (short *)(&dev->enetaddr[0]);
+	u_short tmp, *p = (u_short *)(&dev->enetaddr[0]);
 	int i, j = 0;
 
 	for (i = 0; i < (ETH_ALEN >> 1); i++) {
diff --git a/drivers/e1000.c b/drivers/e1000.c
index 787134a..927acbb 100644
--- a/drivers/e1000.c
+++ b/drivers/e1000.c
@@ -2822,7 +2822,7 @@
 	if (!(le32_to_cpu(rd->status)) & E1000_RXD_STAT_DD)
 		return 0;
 	/*DEBUGOUT("recv: packet len=%d \n", rd->length); */
-	NetReceive(packet, le32_to_cpu(rd->length));
+	NetReceive((uchar *)packet, le32_to_cpu(rd->length));
 	fill_rx(hw);
 	return 1;
 }
diff --git a/drivers/natsemi.c b/drivers/natsemi.c
index 1c1b9a0..b009db6 100644
--- a/drivers/natsemi.c
+++ b/drivers/natsemi.c
@@ -756,6 +756,7 @@
 {
 	u32 i, status = 0;
 	u32 tx_status = 0;
+	vu_long *res = (vu_long *)&tx_status;
 
 	/* Stop the transmitter */
 	OUTL(dev, TxOff, ChipCmd);
@@ -781,7 +782,7 @@
 	OUTL(dev, TxOn, ChipCmd);
 
 	for (i = 0;
-	     ((vu_long)tx_status = le32_to_cpu(txd.cmdsts)) & DescOwn;
+	     (*res = le32_to_cpu(txd.cmdsts)) & DescOwn;
 	     i++) {
 		if (i >= TOUT_LOOP) {
 			printf
diff --git a/drivers/ns8382x.c b/drivers/ns8382x.c
index be99c3b..976f86a 100644
--- a/drivers/ns8382x.c
+++ b/drivers/ns8382x.c
@@ -363,7 +363,7 @@
 		/* get MAC address */
 		for (i = 0; i < 3; i++) {
 			u32 data;
-			char *mac = &dev->enetaddr[i * 2];
+			char *mac = (char *)&dev->enetaddr[i * 2];
 
 			OUTL(dev, i * 2, RxFilterAddr);
 			data = INL(dev, RxFilterData);
diff --git a/drivers/pcnet.c b/drivers/pcnet.c
index 17e8044..da9ac7f 100644
--- a/drivers/pcnet.c
+++ b/drivers/pcnet.c
@@ -195,7 +195,7 @@
 	/*
 	 * Setup the PCI device.
 	 */
-	pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, &dev->iobase);
+	pci_read_config_dword(devbusfn, PCI_BASE_ADDRESS_0, (unsigned int *)&dev->iobase);
 	dev->iobase &= ~0xf;
 
 	PCNET_DEBUG1("%s: devbusfn=0x%x iobase=0x%x: ",
diff --git a/drivers/smiLynxEM.c b/drivers/smiLynxEM.c
index a87aaf3..20f9beb 100644
--- a/drivers/smiLynxEM.c
+++ b/drivers/smiLynxEM.c
@@ -525,7 +525,8 @@
 /*****************************************************************************/
 static void smiLoadCcr (struct ctfb_res_modes *var, unsigned short device_id)
 {
-	unsigned int p, q;
+	unsigned int p = 0;
+	unsigned int q = 0;
 	long long freq;
 	register GraphicDevice *pGD  = (GraphicDevice *)&smi;
 
diff --git a/drivers/tsec.c b/drivers/tsec.c
index ddca901..069a42fe 100644
--- a/drivers/tsec.c
+++ b/drivers/tsec.c
@@ -200,11 +200,11 @@
 	for(i=0;i<MAC_ADDR_LEN;i++) {
 		tmpbuf[MAC_ADDR_LEN - 1 - i] = dev->enetaddr[i];
 	}
-	(uint)(regs->macstnaddr1) = *((uint *)(tmpbuf));
+	regs->macstnaddr1 = *((uint *)(tmpbuf));
 
 	tempval = *((uint *)(tmpbuf +4));
 
-	(uint)(regs->macstnaddr2) = tempval;
+	regs->macstnaddr2 = tempval;
 
 	/* reset the indices to zero */
 	rxIdx = 0;
diff --git a/examples/eepro100_eeprom.c b/examples/eepro100_eeprom.c
index 60b937e..020c31d 100644
--- a/examples/eepro100_eeprom.c
+++ b/examples/eepro100_eeprom.c
@@ -78,9 +78,9 @@
 
 static inline void *memcpy(void *dst, const void *src, unsigned int len)
 {
-	void * ret = dst;
-	while (len-- > 0) *((char *)dst)++ = *((char *)src)++;
-	return ret;
+	char *ret = dst;
+	while (len-- > 0) *(ret)++ = *((char *)src)++;
+	return (void *)ret;
 }
 
 /* The EEPROM commands include the alway-set leading bit. */
diff --git a/examples/sched.c b/examples/sched.c
index 6b78f69..ae01e0b 100644
--- a/examples/sched.c
+++ b/examples/sched.c
@@ -292,7 +292,7 @@
 		current_tid = id;
 		PDEBUG ("thread_start: to be stack=0%08x",
 			(unsigned)lthreads[id].stack);
-		setctxsp (&lthreads[id].stack[STK_SIZE]);
+		setctxsp ((vu_char *)&lthreads[id].stack[STK_SIZE]);
 		thread_launcher ();
 	}
 
diff --git a/fs/fat/fat.c b/fs/fat/fat.c
index 1a40a70..a823b5a 100644
--- a/fs/fat/fat.c
+++ b/fs/fat/fat.c
@@ -83,7 +83,7 @@
 		/* no signature found */
 		return -1;
 	}
-	if(!strncmp(&buffer[DOS_FS_TYPE_OFFSET],"FAT",3)) {
+	if(!strncmp((char *)&buffer[DOS_FS_TYPE_OFFSET],"FAT",3)) {
 		/* ok, we assume we are on a PBR only */
 		cur_part = 1;
 		part_offset=0;
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
index cf01f88..74577d9 100644
--- a/fs/jffs2/compr_rubin.c
+++ b/fs/jffs2/compr_rubin.c
@@ -48,8 +48,8 @@
 void rubin_do_decompress(unsigned char *bits, unsigned char *in,
 			 unsigned char *page_out, __u32 destlen)
 {
-	register char *curr = page_out;
-	char *end = page_out + destlen;
+	register char *curr = (char *)page_out;
+	char *end = (char *)(page_out + destlen);
 	register unsigned long temp;
 	register unsigned long result;
 	register unsigned long p;
@@ -85,8 +85,10 @@
 				rec_q <<= 1;
 				rec_q |= (temp >> (bit++ ^ 7)) & 1;
 				if (bit > 31) {
+					u32 *p = (u32 *)in;
 					bit = 0;
-					temp = *(++((u32 *) in));
+					temp = *(++p);
+					in = (unsigned char *)p;
 				}
 			}
 			i0 =  (bits[i] * p) >> 8;
diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index 0f29071..c6c0c2a 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -496,7 +496,7 @@
 
 	/* length is also the same, so use ascending sort by name
 	 */
-	cmp = strncmp(jNew->name, jOld->name, jNew->nsize);
+	cmp = strncmp((char *)jNew->name, (char *)jOld->name, jNew->nsize);
 	if (cmp != 0)
 		return cmp > 0;
 
@@ -572,8 +572,8 @@
 	struct jffs2_raw_inode *jNode;
 	u32 totalSize = 0;
 	u32 latestVersion = 0;
-	char *lDest;
-	char *src;
+	uchar *lDest;
+	uchar *src;
 	long ret;
 	int i;
 	u32 counter = 0;
@@ -624,14 +624,14 @@
 #endif
 
 			if(dest) {
-				src = ((char *) jNode) + sizeof(struct jffs2_raw_inode);
+				src = ((uchar *) jNode) + sizeof(struct jffs2_raw_inode);
 				/* ignore data behind latest known EOF */
 				if (jNode->offset > totalSize) {
 					put_fl_mem(jNode);
 					continue;
 				}
 
-				lDest = (char *) (dest + jNode->offset);
+				lDest = (uchar *) (dest + jNode->offset);
 #if 0
 				putLabeledWord("read_inode: src = ", src);
 				putLabeledWord("read_inode: dest = ", lDest);
@@ -709,7 +709,7 @@
 		jDir = (struct jffs2_raw_dirent *) get_node_mem(b->offset);
 		if ((pino == jDir->pino) && (len == jDir->nsize) &&
 		    (jDir->ino) &&	/* 0 for unlink */
-		    (!strncmp(jDir->name, name, len))) {	/* a match */
+		    (!strncmp((char *)jDir->name, name, len))) {	/* a match */
 			if (jDir->version < version) {
 				put_fl_mem(jDir);
 				continue;
@@ -776,7 +776,7 @@
 	if (st->st_mtime == (time_t)(-1)) /* some ctimes really hate -1 */
 		st->st_mtime = 1;
 
-	ctime_r(&st->st_mtime, s/*,64*/); /* newlib ctime doesn't have buflen */
+	ctime_r((time_t *)&st->st_mtime, s/*,64*/); /* newlib ctime doesn't have buflen */
 
 	if ((p = strchr(s,'\n')) != NULL) *p = '\0';
 	if ((p = strchr(s,'\r')) != NULL) *p = '\0';
@@ -796,7 +796,7 @@
 
 	if(!d || !i) return -1;
 
-	strncpy(fname, d->name, d->nsize);
+	strncpy(fname, (char *)d->name, d->nsize);
 	fname[d->nsize] = '\0';
 
 	memset(&st,0,sizeof(st));
@@ -971,7 +971,7 @@
 			putnstr(src, jNode->dsize);
 			putstr("\r\n");
 #endif
-			strncpy(tmp, src, jNode->dsize);
+			strncpy(tmp, (char *)src, jNode->dsize);
 			tmp[jNode->dsize] = '\0';
 			put_fl_mem(jNode);
 			break;
diff --git a/include/asm-ppc/byteorder.h b/include/asm-ppc/byteorder.h
index 7b60482..3f5bcf6 100644
--- a/include/asm-ppc/byteorder.h
+++ b/include/asm-ppc/byteorder.h
@@ -39,7 +39,7 @@
 #  define __arch_swab16(x) ld_le16(&x)
 #  define __arch_swab32(x) ld_le32(&x)
 #else
-static __inline__ __const__ __u16 ___arch__swab16(__u16 value)
+static __inline__ __attribute__((const)) __u16 ___arch__swab16(__u16 value)
 {
 	__u16 result;
 
@@ -49,7 +49,7 @@
 	return result;
 }
 
-static __inline__ __const__ __u32 ___arch__swab32(__u32 value)
+static __inline__ __attribute__((const)) __u32 ___arch__swab32(__u32 value)
 {
 	__u32 result;
 
diff --git a/include/cmd_confdefs.h b/include/cmd_confdefs.h
index c79a023..9ee4849 100644
--- a/include/cmd_confdefs.h
+++ b/include/cmd_confdefs.h
@@ -40,7 +40,7 @@
 						/* crc, base, loop, mtest	*/
 #define CFG_CMD_NET		0x00000080ULL	/* bootp, tftpboot, rarpboot	*/
 #define CFG_CMD_ENV		0x00000100ULL	/* saveenv			*/
-#define CFG_CMD_KGDB		0x00000200ULL	/* kgdb				*/
+#define CFG_CMD_KGDB		0x0000000000000200ULL	/* kgdb				*/
 #define CFG_CMD_PCMCIA		0x00000400ULL	/* PCMCIA support		*/
 #define CFG_CMD_IDE		0x00000800ULL	/* IDE harddisk support		*/
 #define CFG_CMD_PCI		0x00001000ULL	/* pciinfo			*/
diff --git a/include/common.h b/include/common.h
index 8536a99..d2570a8 100644
--- a/include/common.h
+++ b/include/common.h
@@ -208,8 +208,8 @@
 /* common/cmd_nvedit.c */
 int	env_init     (void);
 void	env_relocate (void);
-char	*getenv	     (uchar *);
-int	getenv_r     (uchar *name, uchar *buf, unsigned len);
+char	*getenv	     (char *);
+int	getenv_r     (char *name, char *buf, unsigned len);
 int	saveenv	     (void);
 #ifdef CONFIG_PPC		/* ARM version to be fixed! */
 void inline setenv   (char *, char *);
diff --git a/include/configs/AP1000.h b/include/configs/AP1000.h
index c34d650..ba4b1a2 100644
--- a/include/configs/AP1000.h
+++ b/include/configs/AP1000.h
@@ -24,19 +24,19 @@
 
 #undef DEBUG
 
-#define CONFIG_405  1	   /* This is a PPC405 CPU     */
-#define CONFIG_4xx  1	   /* ...member of PPC4xx family   */
+#define CONFIG_405	1		/* This is a PPC405 CPU	    */
+#define CONFIG_4xx	1		/* ...member of PPC4xx family	*/
 
-#define CONFIG_AP1000  1   /* ...on an AP1000 board    */
+#define CONFIG_AP1000	1		/* ...on an AP1000 board    */
 
-#define CONFIG_PCI 1
+#define CONFIG_PCI	1
 
-#define CFG_HUSH_PARSER		1	/* use "hush" command parser	*/
-#define CFG_PROMPT			"0> "
+#define CFG_HUSH_PARSER 1		/* use "hush" command parser	*/
+#define CFG_PROMPT		"0> "
 #define CFG_PROMPT_HUSH_PS2	"> "
 
-#define CONFIG_COMMAND_EDIT 1
-#define CONFIG_COMMAND_HISTORY 1
+#define CONFIG_COMMAND_EDIT	1
+#define CONFIG_COMMAND_HISTORY	1
 #define CONFIG_COMPLETE_ADDRESSES 1
 
 #define CFG_ENV_IS_IN_FLASH	1
@@ -50,10 +50,10 @@
 #endif
 #endif
 
-#define CONFIG_BAUDRATE	    57600
-#define CONFIG_BOOTDELAY    3  /* autoboot after 3 seconds */
+#define CONFIG_BAUDRATE		57600
+#define CONFIG_BOOTDELAY	3	/* autoboot after 3 seconds */
 
-#define CONFIG_BOOTCOMMAND  ""	    /* autoboot command */
+#define CONFIG_BOOTCOMMAND	""	/* autoboot command */
 
 /* Size (bytes) of interrupt driven serial port buffer.
  * Set to 0 to use polling instead of interrupts.
@@ -61,48 +61,47 @@
  */
 #undef	CONFIG_SERIAL_SOFTWARE_FIFO
 
-#define CONFIG_BOOTARGS	    "console=ttyS0,57600"
+#define CONFIG_BOOTARGS		"console=ttyS0,57600"
 
-#define CONFIG_LOADS_ECHO   1	/* echo on for serial download	*/
-#define CFG_LOADS_BAUD_CHANGE	1   /* allow baudrate change	*/
+#define CONFIG_LOADS_ECHO	1	/* echo on for serial download	*/
+#define CFG_LOADS_BAUD_CHANGE	1	/* allow baudrate change	*/
 
-#define CONFIG_COMMANDS	       ( (CONFIG_CMD_DFL & \
-		(~CFG_CMD_RTC) & ~(CFG_CMD_I2C)) | \
-		CFG_CMD_IRQ | \
-		CFG_CMD_PCI | \
-		CFG_CMD_DHCP | \
-		CFG_CMD_ASKENV | \
-		CFG_CMD_ELF  | \
-		CFG_CMD_PING | \
-		CFG_CMD_MVENV  \
+#define CONFIG_COMMANDS	       (CONFIG_CMD_DFL	| \
+				CFG_CMD_ASKENV	| \
+				CFG_CMD_DHCP	| \
+				CFG_CMD_ELF	| \
+				CFG_CMD_IRQ	| \
+				CFG_CMD_MVENV	| \
+				CFG_CMD_PCI	| \
+				CFG_CMD_PING	\
 			       )
 
 /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 #include <cmd_confdefs.h>
 
-#undef CONFIG_WATCHDOG		/* watchdog disabled	    */
+#undef CONFIG_WATCHDOG			/* watchdog disabled	    */
 
-#define CONFIG_SYS_CLK_FREQ 30000000
+#define CONFIG_SYS_CLK_FREQ	30000000
 
-#define CONFIG_SPD_EEPROM      1       /* use SPD EEPROM for setup    */
+#define CONFIG_SPD_EEPROM	1	/* use SPD EEPROM for setup    */
 
 /*
  * Miscellaneous configurable options
  */
-#define CFG_LONGHELP		/* undef to save memory	    */
+#define CFG_LONGHELP			/* undef to save memory	    */
 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
-#define CFG_CBSIZE  1024	/* Console I/O Buffer Size  */
+#define CFG_CBSIZE	1024		/* Console I/O Buffer Size  */
 #else
-#define CFG_CBSIZE  256	    /* Console I/O Buffer Size	*/
+#define CFG_CBSIZE	256		/* Console I/O Buffer Size	*/
 #endif
 /* usually: (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) */
-#define CFG_PBSIZE (CFG_CBSIZE+4+16) /* Print Buffer Size */
-#define CFG_MAXARGS 16	    /* max number of command args   */
-#define CFG_BARGSIZE	CFG_CBSIZE  /* Boot Argument Buffer Size    */
+#define CFG_PBSIZE	(CFG_CBSIZE+4+16)	/* Print Buffer Size */
+#define CFG_MAXARGS	16		/* max number of command args	*/
+#define CFG_BARGSIZE	CFG_CBSIZE	/* Boot Argument Buffer Size	*/
 
-#define CFG_ALT_MEMTEST	    1
-#define CFG_MEMTEST_START   0x00400000	/* memtest works on */
-#define CFG_MEMTEST_END	    0x01000000	/* 4 ... 16 MB in DRAM	*/
+#define CFG_ALT_MEMTEST		1
+#define CFG_MEMTEST_START	0x00400000	/* memtest works on */
+#define CFG_MEMTEST_END		0x01000000	/* 4 ... 16 MB in DRAM	*/
 
 /*
  * If CFG_EXT_SERIAL_CLOCK, then the UART divisor is 1.
@@ -113,84 +112,84 @@
  * If CFG_405_UART_ERRATA_59 and 200MHz CPU clock,
  * set Linux BASE_BAUD to 403200.
  */
-#undef	CFG_EXT_SERIAL_CLOCK	       /* external serial clock */
-#undef	CFG_405_UART_ERRATA_59	       /* 405GP/CR Rev. D silicon */
+#undef	CFG_EXT_SERIAL_CLOCK		/* external serial clock */
+#undef	CFG_405_UART_ERRATA_59		/* 405GP/CR Rev. D silicon */
 
-#define CFG_NS16550_CLK	    40000000
-#define CFG_DUART_CHAN	    0
-#define CFG_NS16550_COM1    (0x4C000000 + 0x1000)
-#define CFG_NS16550_COM2    (0x4C800000 + 0x1000)
-#define CFG_NS16550_REG_SIZE 4
-#define CFG_NS16550 1
-#define CFG_INIT_CHAN1	 1
-#define CFG_INIT_CHAN2	 0
+#define CFG_NS16550_CLK		40000000
+#define CFG_DUART_CHAN		0
+#define CFG_NS16550_COM1	(0x4C000000 + 0x1000)
+#define CFG_NS16550_COM2	(0x4C800000 + 0x1000)
+#define CFG_NS16550_REG_SIZE	4
+#define CFG_NS16550		1
+#define CFG_INIT_CHAN1		1
+#define CFG_INIT_CHAN2		0
 
 /* The following table includes the supported baudrates */
 #define CFG_BAUDRATE_TABLE  \
     {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400}
 
-#define CFG_LOAD_ADDR	    0x00100000	/* default load address */
-#define CFG_EXTBDINFO	    1	/* To use extended board_into (bd_t) */
+#define CFG_LOAD_ADDR		0x00200000	/* default load address */
+#define CFG_EXTBDINFO		1		/* To use extended board_into (bd_t) */
 
-#define CFG_HZ	    1000	/* decrementer freq: 1 ms ticks */
+#define CFG_HZ			1000		/* decrementer freq: 1 ms ticks */
 
 /*-----------------------------------------------------------------------
  * Start addresses for the final memory configuration
  * (Set up by the startup code)
  * Please note that CFG_SDRAM_BASE _must_ start at 0
  */
-#define CFG_SDRAM_BASE	    0x00000000
-#define CFG_FLASH_BASE	    0x20000000
-#define CFG_MONITOR_BASE    TEXT_BASE
-#define CFG_MONITOR_LEN	    (192 * 1024)    /* Reserve 196 kB for Monitor   */
-#define CFG_MALLOC_LEN	    (128 * 1024)    /* Reserve 128 kB for malloc()  */
+#define CFG_SDRAM_BASE		0x00000000
+#define CFG_FLASH_BASE		0x20000000
+#define CFG_MONITOR_BASE	TEXT_BASE
+#define CFG_MONITOR_LEN		(192 * 1024)	/* Reserve 196 kB for Monitor	*/
+#define CFG_MALLOC_LEN		(128 * 1024)	/* Reserve 128 kB for malloc()	*/
 
 /*
  * For booting Linux, the board info and command line data
  * have to be in the first 8 MB of memory, since this is
  * the maximum mapped by the Linux kernel during initialization.
  */
-#define CFG_BOOTMAPSZ	    (8 << 20)	/* Initial Memory map for Linux */
+#define CFG_BOOTMAPSZ		(8 << 20)	/* Initial Memory map for Linux */
 /*-----------------------------------------------------------------------
  * FLASH organization
  */
-#define CFG_FLASH_CFI	    1
-#define CFG_PROGFLASH_BASE  CFG_FLASH_BASE
-#define CFG_CONFFLASH_BASE  0x24000000
+#define CFG_FLASH_CFI		1
+#define CFG_PROGFLASH_BASE	CFG_FLASH_BASE
+#define CFG_CONFFLASH_BASE	0x24000000
 
-#define CFG_MAX_FLASH_BANKS 2	/* max number of memory banks	    */
-#define CFG_MAX_FLASH_SECT  256 /* max number of sectors on one chip	*/
+#define CFG_MAX_FLASH_BANKS	2	/* max number of memory banks	    */
+#define CFG_MAX_FLASH_SECT	256	/* max number of sectors on one chip	*/
 
 #define CFG_FLASH_ERASE_TOUT	120000	/* Timeout for Flash Erase (in ms)  */
-#define CFG_FLASH_WRITE_TOUT	500 /* Timeout for Flash Write (in ms)	*/
+#define CFG_FLASH_WRITE_TOUT	500	/* Timeout for Flash Write (in ms)	*/
 
-#define CFG_FLASH_PROTECTION	1   /* use hardware protection	    */
+#define CFG_FLASH_PROTECTION	1	/* use hardware protection	    */
 
 /* BEG ENVIRONNEMENT FLASH */
 #ifdef CFG_ENV_IS_IN_FLASH
-#define CFG_ENV_OFFSET	    0x00040000 /* Offset of Environment Sector	*/
-#define CFG_ENV_SIZE	    0x1000  /* Total Size of Environment Sector */
-#define CFG_ENV_SECT_SIZE   0x20000 /* see README - env sector total size   */
+#define CFG_ENV_OFFSET		0x00040000 /* Offset of Environment Sector	*/
+#define CFG_ENV_SIZE		0x1000	/* Total Size of Environment Sector */
+#define CFG_ENV_SECT_SIZE	0x20000 /* see README - env sector total size	*/
 #endif
 /* END ENVIRONNEMENT FLASH */
 /*-----------------------------------------------------------------------
  * NVRAM organization
  */
-#define CFG_NVRAM_BASE_ADDR 0xf0000000	/* NVRAM base address	*/
-#define CFG_NVRAM_SIZE	    0x1ff8	/* NVRAM size	*/
+#define CFG_NVRAM_BASE_ADDR	0xf0000000	/* NVRAM base address	*/
+#define CFG_NVRAM_SIZE		0x1ff8		/* NVRAM size	*/
 
 #ifdef CFG_ENV_IS_IN_NVRAM
-#define CFG_ENV_SIZE	    0x1000	/* Size of Environment vars */
+#define CFG_ENV_SIZE		0x1000		/* Size of Environment vars */
 #define CFG_ENV_ADDR	    \
     (CFG_NVRAM_BASE_ADDR+CFG_NVRAM_SIZE-CFG_ENV_SIZE)	/* Env	*/
 #endif
 /*-----------------------------------------------------------------------
  * Cache Configuration
  */
-#define CFG_DCACHE_SIZE	    16384
-#define CFG_CACHELINE_SIZE  32
+#define CFG_DCACHE_SIZE		16384
+#define CFG_CACHELINE_SIZE	32
 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
-#define CFG_CACHELINE_SHIFT 5	/* log base 2 of the above value    */
+#define CFG_CACHELINE_SHIFT	5	/* log base 2 of the above value    */
 #endif
 
 /*
@@ -199,11 +198,11 @@
  * BR0/1 and OR0/1 (FLASH)
  */
 
-#define FLASH_BASE0_PRELIM  CFG_FLASH_BASE  /* FLASH bank #0	*/
-#define FLASH_BASE1_PRELIM  0	    /* FLASH bank #1	*/
+#define FLASH_BASE0_PRELIM	CFG_FLASH_BASE	/* FLASH bank #0	*/
+#define FLASH_BASE1_PRELIM	0		/* FLASH bank #1	*/
 
 /* Configuration Port location */
-#define CONFIG_PORT_ADDR    0xF0000500
+#define CONFIG_PORT_ADDR	0xF0000500
 
 /*-----------------------------------------------------------------------
  * Definitions for initial stack pointer and data area (in DPRAM)
@@ -211,8 +210,8 @@
 
 #define CFG_INIT_RAM_ADDR	0x400000  /* inside of SDRAM			 */
 #define CFG_INIT_RAM_END	0x2000	/* End of used area in RAM	       */
-#define CFG_GBL_DATA_SIZE      128  /* size in bytes reserved for initial data */
-#define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
+#define CFG_GBL_DATA_SIZE	128	/* size in bytes reserved for initial data */
+#define CFG_GBL_DATA_OFFSET	(CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
 #define CFG_INIT_SP_OFFSET	CFG_GBL_DATA_OFFSET
 
 /*-----------------------------------------------------------------------
@@ -226,25 +225,25 @@
  *
  * Boot Flags
  */
-#define BOOTFLAG_COLD	0x01	    /* Normal Power-On: Boot from FLASH */
-#define BOOTFLAG_WARM	0x02	    /* Software reboot		*/
+#define BOOTFLAG_COLD	0x01		/* Normal Power-On: Boot from FLASH */
+#define BOOTFLAG_WARM	0x02		/* Software reboot		*/
 
 #if (CONFIG_COMMANDS & CFG_CMD_KGDB)
 #define CONFIG_KGDB_BAUDRATE	230400	/* speed to run kgdb serial port */
-#define CONFIG_KGDB_SER_INDEX	2   /* which serial port to use */
+#define CONFIG_KGDB_SER_INDEX	2	/* which serial port to use */
 #endif
 
 /* JFFS2 stuff */
 
-#define CFG_JFFS2_FIRST_BANK 0
-#define CFG_JFFS2_NUM_BANKS 1
-#define CFG_JFFS2_FIRST_SECTOR 1
+#define CFG_JFFS2_FIRST_BANK	0
+#define CFG_JFFS2_NUM_BANKS	1
+#define CFG_JFFS2_FIRST_SECTOR	1
 
 #define CONFIG_NET_MULTI
 #define CONFIG_E1000
 
-#define CFG_ETH_DEV_FN	   0x0800
-#define CFG_ETH_IOBASE	   0x31000000
-#define CFG_ETH_MEMBASE	   0x32000000
+#define CFG_ETH_DEV_FN		0x0800
+#define CFG_ETH_IOBASE		0x31000000
+#define CFG_ETH_MEMBASE		0x32000000
 
 #endif	/* __CONFIG_H */
diff --git a/include/configs/APC405.h b/include/configs/APC405.h
index b53e85e..3ac567b 100644
--- a/include/configs/APC405.h
+++ b/include/configs/APC405.h
@@ -357,7 +357,7 @@
 #define CFG_LCD_MEM             CFG_LCD_BIG_MEM
 #define CFG_LCD_REG             CFG_LCD_BIG_REG
 
-#define CFG_LCD_LOGO_MAX_SIZE   (1024*1024)
+#define CFG_VIDEO_LOGO_MAX_SIZE (1 << 20)
 
 /*-----------------------------------------------------------------------
  * Definitions for initial stack pointer and data area (in data cache)
diff --git a/include/configs/HH405.h b/include/configs/HH405.h
index dd29be0..131c215 100644
--- a/include/configs/HH405.h
+++ b/include/configs/HH405.h
@@ -88,7 +88,7 @@
 #define CFG_CONSOLE_IS_IN_ENV
 #define CONFIG_SPLASH_SCREEN
 #define CONFIG_VIDEO_BMP_GZIP		/* gzip compressed bmp images	*/
-#define CFG_VIDEO_LOGO_MAX_SIZE	(1024*1024)	/* for decompressed img */
+#define CFG_VIDEO_LOGO_MAX_SIZE	(2 << 20)	/* for decompressed img */
 
 #define ADD_BMP_CMD		CFG_CMD_BMP
 #else
@@ -308,7 +308,7 @@
 #define CFG_FLASH_BASE		0xFFF80000
 #define CFG_MONITOR_BASE	TEXT_BASE
 #define CFG_MONITOR_LEN		(512 * 1024)	/* Reserve 512 kB for Monitor	*/
-#define CFG_MALLOC_LEN		(2 * 1024*1024)	/* Reserve 2 MB for malloc()	*/
+#define CFG_MALLOC_LEN		(4 << 20)	/* Reserve 4 MB for malloc()	*/
 
 #if (CFG_MONITOR_BASE < FLASH_BASE0_PRELIM)
 # define CFG_RAMBOOT		1
@@ -409,8 +409,6 @@
 #define CFG_LCD_SMALL_MEM       0xF1400000  /* Epson S1D13704 Mem Base Address  */
 #define CFG_LCD_SMALL_REG       0xF140FFE0  /* Epson S1D13704 Reg Base Address  */
 
-#define CFG_LCD_LOGO_MAX_SIZE   (1024*1024)
-
 /*-----------------------------------------------------------------------
  * Universal Interrupt Controller (UIC) Setup
  */
diff --git a/include/configs/NC650.h b/include/configs/NC650.h
index d24d05f..cd04c1a 100644
--- a/include/configs/NC650.h
+++ b/include/configs/NC650.h
@@ -99,19 +99,17 @@
 #define SCL		0x1000		/* PA 3 */
 #define SDA		0x2000		/* PA 2 */
 
-#define PAR		immr->im_ioport.iop_papar
-#define DIR		immr->im_ioport.iop_padir
-#define DAT		immr->im_ioport.iop_padat
-
-#define I2C_INIT	{PAR &= ~(SCL | SDA); DIR |=  SCL;}
-#define I2C_ACTIVE	(DIR |=  SDA)
-#define I2C_TRISTATE	(DIR &= ~SDA)
-#define I2C_READ	((DAT & SDA) != 0)
-#define I2C_SDA(bit)	if (bit) DAT |=  SDA; \
-			else DAT &= ~SDA
-#define I2C_SCL(bit)	if (bit) DAT |=  SCL; \
-			else DAT &= ~SCL
-#define I2C_DELAY	udelay(5)	/* 1/4 I2C clock duration */
+#define __I2C_DIR	immr->im_ioport.iop_padir
+#define __I2C_DAT	immr->im_ioport.iop_padat
+#define __I2C_PAR	immr->im_ioport.iop_papar
+#define	I2C_INIT	{ __I2C_PAR &= ~(SDA|SCL);	\
+			  __I2C_DIR |= (SDA|SCL);	}
+#define	I2C_READ	((__I2C_DAT & SDA) ? 1 : 0)
+#define	I2C_SDA(x)	{ if (x) __I2C_DAT |= SDA; else __I2C_DAT &= ~SDA; }
+#define	I2C_SCL(x)	{ if (x) __I2C_DAT |= SCL; else __I2C_DAT &= ~SCL; }
+#define	I2C_DELAY	{ udelay(5); }
+#define	I2C_ACTIVE	{ __I2C_DIR |= SDA; }
+#define	I2C_TRISTATE	{ __I2C_DIR &= ~SDA; }
 
 #define CONFIG_RTC_PCF8563
 #define CFG_I2C_RTC_ADDR		0x51
diff --git a/include/configs/PM854.h b/include/configs/PM854.h
index af06efc..0b8c71d 100644
--- a/include/configs/PM854.h
+++ b/include/configs/PM854.h
@@ -235,7 +235,7 @@
 #define CONFIG_NET_MULTI
 #define CONFIG_PCI_PNP			/* do pci plug-and-play */
 
-#define	CONFIG_EEPRO100
+/* #define CONFIG_EEPRO100	XXX - FIXME: conflicts when CONFIG_MII is enabled */
 #define	CONFIG_E1000
 #undef	CONFIG_TULIP
 
diff --git a/include/configs/TOP860.h b/include/configs/TOP860.h
index af74f9d..99a7b08 100644
--- a/include/configs/TOP860.h
+++ b/include/configs/TOP860.h
@@ -181,17 +181,20 @@
 #if defined (CONFIG_SOFT_I2C)
 #define	SDA	0x00010
 #define	SCL	0x00020
-#define DIR immr->im_cpm.cp_pbdir
-#define DAT	immr->im_cpm.cp_pbdat
-#define PAR	immr->im_cpm.cp_pbpar
-#define	ODR	immr->im_cpm.cp_pbodr
-#define	I2C_INIT	{PAR&=~(SDA|SCL);ODR&=~(SDA|SCL);DAT|=(SDA|SCL);DIR|=(SDA|SCL);}
-#define	I2C_READ	((DAT&SDA)?1:0)
-#define	I2C_SDA(x)	{if(x)DAT|=SDA;else DAT&=~SDA;}
-#define	I2C_SCL(x)	{if(x)DAT|=SCL;else DAT&=~SCL;}
-#define	I2C_DELAY	{udelay(5);}
-#define	I2C_ACTIVE	 {DIR|=SDA;}
-#define	I2C_TRISTATE {DIR&=~SDA;}
+#define __I2C_DIR	immr->im_cpm.cp_pbdir
+#define __I2C_DAT	immr->im_cpm.cp_pbdat
+#define __I2C_PAR	immr->im_cpm.cp_pbpar
+#define	__I2C_ODR	immr->im_cpm.cp_pbodr
+#define	I2C_INIT	{ __I2C_PAR &= ~(SDA|SCL);	\
+			  __I2C_ODR &= ~(SDA|SCL);	\
+			  __I2C_DAT |= (SDA|SCL);	\
+			  __I2C_DIR|=(SDA|SCL);	}
+#define	I2C_READ	((__I2C_DAT & SDA) ? 1 : 0)
+#define	I2C_SDA(x)	{ if (x) __I2C_DAT |= SDA; else __I2C_DAT &= ~SDA; }
+#define	I2C_SCL(x)	{ if (x) __I2C_DAT |= SCL; else __I2C_DAT &= ~SCL; }
+#define	I2C_DELAY	{ udelay(5); }
+#define	I2C_ACTIVE	{ __I2C_DIR |= SDA; }
+#define	I2C_TRISTATE	{ __I2C_DIR &= ~SDA; }
 #endif
 
 #define CFG_BAUDRATE_TABLE	{ 9600, 19200, 38400, 57600, 115200, 230400 }
diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h
index 909d724..a57f7cf 100644
--- a/include/configs/TQM5200.h
+++ b/include/configs/TQM5200.h
@@ -83,7 +83,7 @@
 #define CONFIG_PCI_IO_SIZE	0x01000000
 
 #define CONFIG_NET_MULTI	1
-#define CONFIG_EEPRO100		1
+/* #define CONFIG_EEPRO100	XXX - FIXME: conflicts when CONFIG_MII is enabled */
 #define CFG_RX_ETH_BUFFER	8  /* use 8 rx buffer on eepro100  */
 #define CONFIG_NS8382X		1
 #endif	/* CONFIG_STK52XX */
diff --git a/include/configs/TQM8560.h b/include/configs/TQM8560.h
index d2c230d..04966d7 100644
--- a/include/configs/TQM8560.h
+++ b/include/configs/TQM8560.h
@@ -283,7 +283,7 @@
 #define CONFIG_NET_MULTI
 #define CONFIG_PCI_PNP			/* do pci plug-and-play */
 
-#define CONFIG_EEPRO100
+/* #define CONFIG_EEPRO100	XXX - FIXME: conflicts when CONFIG_MII is enabled */
 #undef CONFIG_TULIP
 
 #if !defined(CONFIG_PCI_PNP)
diff --git a/include/configs/VOH405.h b/include/configs/VOH405.h
index b3ce3da..3ca137e 100644
--- a/include/configs/VOH405.h
+++ b/include/configs/VOH405.h
@@ -362,7 +362,7 @@
 #define CFG_LCD_SMALL_MEM       0xF1400000  /* Epson S1D13704 Mem Base Address  */
 #define CFG_LCD_SMALL_REG       0xF140FFE0  /* Epson S1D13704 Reg Base Address  */
 
-#define CFG_LCD_LOGO_MAX_SIZE   (1024*1024)
+#define CFG_VIDEO_LOGO_MAX_SIZE (1 << 20)
 
 /*-----------------------------------------------------------------------
  * FPGA stuff
diff --git a/include/configs/barco.h b/include/configs/barco.h
index 217c00f..624fa1d 100644
--- a/include/configs/barco.h
+++ b/include/configs/barco.h
@@ -162,7 +162,7 @@
 #define CFG_ENV_IS_IN_FLASH	1
 #define CFG_ENV_OFFSET		0x000047A4	/* Offset of Environment Sector */
 #define CFG_ENV_SIZE		0x00002000	/* Total Size of Environment Sector */
-#define ENV_CRC			0x8BF6F24B
+/* #define ENV_CRC		0x8BF6F24B	XXX - FIXME: gets defined automatically */
 
 #define CFG_MALLOC_LEN		(512 << 10)	/* Reserve 512 kB for malloc()	*/
 
diff --git a/include/configs/o2dnt.h b/include/configs/o2dnt.h
index ffa2678..62b90e8 100644
--- a/include/configs/o2dnt.h
+++ b/include/configs/o2dnt.h
@@ -69,7 +69,7 @@
 #define CFG_XLB_PIPELINING	1
 
 #define CONFIG_NET_MULTI	1
-#define CONFIG_EEPRO100		1
+/* #define CONFIG_EEPRO100	XXX - FIXME: conflicts when CONFIG_MII is enabled */
 #define CFG_RX_ETH_BUFFER	8  /* use 8 rx buffer on eepro100  */
 #define CONFIG_NS8382X		1
 
diff --git a/include/configs/stxxtc.h b/include/configs/stxxtc.h
index f6e6a60..3ffe6b2 100644
--- a/include/configs/stxxtc.h
+++ b/include/configs/stxxtc.h
@@ -574,19 +574,15 @@
 #define CONFIG_CRC32_VERIFY	1
 #define CONFIG_HUSH_OLD_PARSER_COMPATIBLE	1
 
-/* Note: change below for your network setting!!!
- * This was done just to facilitate manufacturing test and configuration.
- */
-#define CONFIG_ETHADDR	 00:e0:0c:07:9b:8a
+/*****************************************************************************/
 
-#define CONFIG_SERVERIP 	192.168.08.1
-#define CONFIG_IPADDR  		192.168.08.85
-#define CONFIG_GATEWAYIP	192.168.08.1
-#define CONFIG_NETMASK		255.255.255.0
-#define CONFIG_HOSTNAME 	stx_xtc
-#define CONFIG_ROOTPATH 	/xtcroot
-#define CONFIG_BOOTFILE 	uImage
-#define CONFIG_LOADADDR		0x1000000
+/* pass open firmware flat tree */
+#define CONFIG_OF_FLAT_TREE	1
 
+/* maximum size of the flat tree (8K) */
+#define OF_FLAT_TREE_MAX_SIZE	8192
+
+#define OF_CPU			"PowerPC,MPC870@0"
+#define OF_TBCLK		(MPC8XX_HZ / 16)
 
 #endif	/* __CONFIG_H */
diff --git a/include/flash.h b/include/flash.h
index 6381cfc..decb046 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -83,7 +83,7 @@
 
 /* common/flash.c */
 extern void flash_protect (int flag, ulong from, ulong to, flash_info_t *info);
-extern int flash_write (uchar *, ulong, ulong);
+extern int flash_write (char *, ulong, ulong);
 extern flash_info_t *addr2info (ulong);
 extern int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt);
 
diff --git a/include/fpga.h b/include/fpga.h
index 782b58e..a038aa1 100644
--- a/include/fpga.h
+++ b/include/fpga.h
@@ -73,7 +73,7 @@
 /* root function definitions */
 extern void fpga_init( ulong reloc_off );
 extern int fpga_add( fpga_type devtype, void *desc );
-extern const int fpga_count( void );
+extern int fpga_count( void );
 extern int fpga_load( int devnum, void *buf, size_t bsize );
 extern int fpga_dump( int devnum, void *buf, size_t bsize );
 extern int fpga_info( int devnum );
diff --git a/include/ft_build.h b/include/ft_build.h
new file mode 100644
index 0000000..9104b1a
--- /dev/null
+++ b/include/ft_build.h
@@ -0,0 +1,66 @@
+/*
+ * OF Flat tree builder
+ *
+ */
+
+#ifndef FT_BUILD_H
+#define FT_BUILD_H
+
+#include <linux/types.h>
+#include <asm/u-boot.h>
+
+/* Definitions used by the flattened device tree */
+#define OF_DT_HEADER		0xd00dfeed	/* marker */
+#define OF_DT_BEGIN_NODE	0x1	/* Start of node, full name */
+#define OF_DT_END_NODE		0x2	/* End node */
+#define OF_DT_PROP		0x3	/* Property: name off, size,
+					 * content */
+#define OF_DT_NOP		0x4	/* nop */
+#define OF_DT_END		0x9
+
+#define OF_DT_VERSION		0x10
+
+struct boot_param_header {
+	u32 magic;		/* magic word OF_DT_HEADER */
+	u32 totalsize;		/* total size of DT block */
+	u32 off_dt_struct;	/* offset to structure */
+	u32 off_dt_strings;	/* offset to strings */
+	u32 off_mem_rsvmap;	/* offset to memory reserve map */
+	u32 version;		/* format version */
+	u32 last_comp_version;	/* last compatible version */
+	/* version 2 fields below */
+	u32 boot_cpuid_phys;	/* Physical CPU id we're booting on */
+	/* version 3 fields below */
+	u32 dt_strings_size;	/* size of the DT strings block */
+};
+
+struct ft_cxt {
+	struct boot_param_header *bph;
+	int max_size;		/* maximum size of tree */
+	int overflow;		/* set when this happens */
+	u8 *p, *pstr, *pres;	/* running pointers */
+	u8 *p_begin, *pstr_begin, *pres_begin;	/* starting pointers */
+	u8 *p_anchor;		/* start of constructed area */
+	int struct_size, strings_size, res_size;
+};
+
+void ft_begin_node(struct ft_cxt *cxt, const char *name);
+void ft_end_node(struct ft_cxt *cxt);
+
+void ft_begin_tree(struct ft_cxt *cxt);
+int ft_end_tree(struct ft_cxt *cxt);
+
+void ft_nop(struct ft_cxt *cxt);
+void ft_prop(struct ft_cxt *cxt, const char *name, const void *data, int sz);
+void ft_prop_str(struct ft_cxt *cxt, const char *name, const char *str);
+void ft_prop_int(struct ft_cxt *cxt, const char *name, int val);
+void ft_begin(struct ft_cxt *cxt, void *blob, int max_size);
+void ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size);
+
+void ft_setup(void *blob, int size, bd_t * bd);
+
+void ft_dump_blob(const void *bphp);
+void ft_merge_blob(struct ft_cxt *cxt, void *blob);
+void *ft_get_prop(void *bphp, const char *propname, int *szp);
+
+#endif
diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h
index 03468f7..b1d570e 100644
--- a/include/linux/byteorder/swab.h
+++ b/include/linux/byteorder/swab.h
@@ -96,7 +96,7 @@
 #endif /* OPTIMIZE */
 
 
-static __inline__ __const__ __u16 __fswab16(__u16 x)
+static __inline__ __attribute__((const)) __u16 __fswab16(__u16 x)
 {
 	return __arch__swab16(x);
 }
@@ -109,7 +109,7 @@
 	__arch__swab16s(addr);
 }
 
-static __inline__ __const__ __u32 __fswab32(__u32 x)
+static __inline__ __attribute__((const)) __u32 __fswab32(__u32 x)
 {
 	return __arch__swab32(x);
 }
@@ -123,7 +123,7 @@
 }
 
 #ifdef __BYTEORDER_HAS_U64__
-static __inline__ __const__ __u64 __fswab64(__u64 x)
+static __inline__ __attribute__((const)) __u64 __fswab64(__u64 x)
 {
 #  ifdef __SWAB_64_THRU_32__
 	__u32 h = x >> 32;
diff --git a/include/net.h b/include/net.h
index 623d225..47eab59 100644
--- a/include/net.h
+++ b/include/net.h
@@ -453,7 +453,7 @@
 extern ushort getenv_VLAN(char *);
 
 /* copy a filename (allow for "..." notation, limit length) */
-extern void	copy_filename (uchar *dst, uchar *src, int size);
+extern void	copy_filename (char *dst, char *src, int size);
 
 /**********************************************************************/
 
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index b1c6ab0..c3ce33f 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -186,7 +186,7 @@
 
 static int init_baudrate (void)
 {
-	uchar tmp[64];	/* long enough for environment variables */
+	char tmp[64];	/* long enough for environment variables */
 	int i = getenv_r ("baudrate", tmp, sizeof (tmp));
 
 	gd->baudrate = (i > 0)
@@ -401,8 +401,8 @@
 	/*
 	 * reserve protected RAM
 	 */
-	i = getenv_r ("pram", tmp, sizeof (tmp));
-	reg = (i > 0) ? simple_strtoul (tmp, NULL, 10) : CONFIG_PRAM;
+	i = getenv_r ("pram", (char *)tmp, sizeof (tmp));
+	reg = (i > 0) ? simple_strtoul ((const char *)tmp, NULL, 10) : CONFIG_PRAM;
 	addr -= (reg << 10);		/* size is in kB */
 	debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
 #endif /* CONFIG_PRAM */
@@ -542,8 +542,8 @@
 	bd->bi_baudrate = gd->baudrate;	/* Console Baudrate     */
 
 #ifdef CFG_EXTBDINFO
-	strncpy (bd->bi_s_version, "1.2", sizeof (bd->bi_s_version));
-	strncpy (bd->bi_r_version, U_BOOT_VERSION, sizeof (bd->bi_r_version));
+	strncpy ((char *)bd->bi_s_version, "1.2", sizeof (bd->bi_s_version));
+	strncpy ((char *)bd->bi_r_version, U_BOOT_VERSION, sizeof (bd->bi_r_version));
 
 	bd->bi_procfreq = gd->cpu_clk;	/* Processor Speed, In Hz */
 	bd->bi_plb_busfreq = gd->bus_clk;
@@ -1042,8 +1042,8 @@
 		/* Also take the logbuffer into account (pram is in kB) */
 		pram += (LOGBUFF_LEN+LOGBUFF_OVERHEAD)/1024;
 #endif
-		sprintf (memsz, "%ldk", (bd->bi_memsize / 1024) - pram);
-		setenv ("mem", memsz);
+		sprintf ((char *)memsz, "%ldk", (bd->bi_memsize / 1024) - pram);
+		setenv ("mem", (char *)memsz);
 	}
 #endif
 
@@ -1081,6 +1081,41 @@
 
 #ifdef CONFIG_MODEM_SUPPORT
 /* called from main loop (common/main.c) */
+/* 'inline' - We have to do it fast */
+static inline void mdm_readline(char *buf, int bufsiz)
+{
+	char c;
+	char *p;
+	int n;
+
+	n = 0;
+	p = buf;
+	for(;;) {
+		c = serial_getc();
+
+		/*		dbg("(%c)", c); */
+
+		switch(c) {
+		case '\r':
+			break;
+		case '\n':
+			*p = '\0';
+			return;
+
+		default:
+			if(n++ > bufsiz) {
+				*p = '\0';
+				return; /* sanity check */
+			}
+			*p = c;
+			p++;
+			break;
+		}
+	}
+}
+
+
+
 extern void  dbg(const char *fmt, ...);
 int mdm_init (void)
 {
@@ -1088,7 +1123,6 @@
 	char *init_str;
 	int i;
 	extern char console_buffer[];
-	static inline void mdm_readline(char *buf, int bufsiz);
 	extern void enable_putc(void);
 	extern int hwflow_onoff(int);
 
@@ -1143,38 +1177,6 @@
 	return 0;
 }
 
-/* 'inline' - We have to do it fast */
-static inline void mdm_readline(char *buf, int bufsiz)
-{
-	char c;
-	char *p;
-	int n;
-
-	n = 0;
-	p = buf;
-	for(;;) {
-		c = serial_getc();
-
-		/*		dbg("(%c)", c); */
-
-		switch(c) {
-		case '\r':
-			break;
-		case '\n':
-			*p = '\0';
-			return;
-
-		default:
-			if(n++ > bufsiz) {
-				*p = '\0';
-				return; /* sanity check */
-			}
-			*p = c;
-			p++;
-			break;
-		}
-	}
-}
 #endif
 
 #if 0 /* We could use plain global data, but the resulting code is bigger */
diff --git a/net/bootp.c b/net/bootp.c
index b907351..8c56c08 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -330,7 +330,7 @@
 
 	/* Retrieve extended information (we must parse the vendor area) */
 	if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC))
-		BootpVendorProcess(&bp->bp_vend[4], len);
+		BootpVendorProcess((uchar *)&bp->bp_vend[4], len);
 
 	NetSetTimeout(0, (thand_f *)0);
 
@@ -387,7 +387,7 @@
 	u8 *x;
 #endif
 #if (CONFIG_BOOTP_MASK & CONFIG_BOOTP_SEND_HOSTNAME)
-	uchar *hostname;
+	char *hostname;
 #endif
 
 	*e++ = 99;		/* RFC1048 Magic Cookie */
@@ -578,7 +578,7 @@
 	unsigned char bi_enetaddr[6];
 	int   reg;
 	char  *e,*s;
-	uchar tmp[64];
+	char tmp[64];
 	ulong tst1, tst2, sum, m_mask, m_value = 0;
 
 	if (BootpTry ==0) {
@@ -679,9 +679,9 @@
 
 	/* Request additional information from the BOOTP/DHCP server */
 #if (CONFIG_COMMANDS & CFG_CMD_DHCP)
-	ext_len = DhcpExtended(bp->bp_vend, DHCP_DISCOVER, 0, 0);
+	ext_len = DhcpExtended((u8 *)bp->bp_vend, DHCP_DISCOVER, 0, 0);
 #else
-	ext_len = BootpExtended(bp->bp_vend);
+	ext_len = BootpExtended((u8 *)bp->bp_vend);
 #endif	/* CFG_CMD_DHCP */
 
 	/*
@@ -836,7 +836,7 @@
 	 * Copy options from OFFER packet if present
 	 */
 	NetCopyIP(&OfferedIP, &bp->bp_yiaddr);
-	extlen = DhcpExtended(bp->bp_vend, DHCP_REQUEST, NetDHCPServerIP, OfferedIP);
+	extlen = DhcpExtended((u8 *)bp->bp_vend, DHCP_REQUEST, NetDHCPServerIP, OfferedIP);
 
 	pktlen = BOOTP_SIZE - sizeof(bp->bp_vend) + extlen;
 	iplen = BOOTP_HDR_SIZE - sizeof(bp->bp_vend) + extlen;
@@ -882,7 +882,7 @@
 			dhcp_state = REQUESTING;
 
 			if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC))
-				DhcpOptionsProcess(&bp->bp_vend[4]);
+				DhcpOptionsProcess((u8 *)&bp->bp_vend[4]);
 
 			BootpCopyNetParams(bp); /* Store net params from reply */
 
@@ -897,11 +897,11 @@
 	case REQUESTING:
 		debug ("DHCP State: REQUESTING\n");
 
-		if ( DhcpMessageType(bp->bp_vend) == DHCP_ACK ) {
+		if ( DhcpMessageType((u8 *)bp->bp_vend) == DHCP_ACK ) {
 			char *s;
 
 			if (NetReadLong((ulong*)&bp->bp_vend[0]) == htonl(BOOTP_VENDOR_MAGIC))
-				DhcpOptionsProcess(&bp->bp_vend[4]);
+				DhcpOptionsProcess((u8 *)&bp->bp_vend[4]);
 			BootpCopyNetParams(bp); /* Store net params from reply */
 			dhcp_state = BOUND;
 			puts ("DHCP client bound to address ");
diff --git a/net/eth.c b/net/eth.c
index fe1edd1..cfab0e1 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -109,7 +109,7 @@
 
 int eth_initialize(bd_t *bis)
 {
-	unsigned char enetvar[32], env_enetaddr[6];
+	char enetvar[32], env_enetaddr[6];
 	int i, eth_number = 0;
 	char *tmp, *end;
 
diff --git a/net/net.c b/net/net.c
index 11b7700..d1a15e2 100644
--- a/net/net.c
+++ b/net/net.c
@@ -810,6 +810,7 @@
 	int     odd;
 	ulong   result = 0;
 	ushort  leftover;
+	ushort *p;
 
 	if (len > 0) {
 		odd = 1 & (ulong)buff;
@@ -819,7 +820,9 @@
 			buff++;
 		}
 		while (len > 1) {
-			result += *((const ushort *)buff)++;
+			p = (ushort *)buff;
+			result += *p++;
+			buff = (uchar *)p;
 			if (result & 0x80000000)
 				result = (result & 0xFFFF) + (result >> 16);
 			len -= 2;
@@ -1655,7 +1658,7 @@
 	ip->ip_sum   = ~NetCksum((uchar *)ip, IP_HDR_SIZE_NO_UDP / 2);
 }
 
-void copy_filename (uchar *dst, uchar *src, int size)
+void copy_filename (char *dst, char *src, int size)
 {
 	if (*src && (*src == '"')) {
 		++src;
diff --git a/net/tftp.c b/net/tftp.c
index 43c4336..eca21d2 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -78,7 +78,7 @@
 	}
 
 	if (rc) { /* Flash is destination for this packet */
-		rc = flash_write ((uchar *)src, (ulong)(load_addr+offset), len);
+		rc = flash_write ((char *)src, (ulong)(load_addr+offset), len);
 		if (rc) {
 			flash_perror (rc);
 			NetState = NETLOOP_FAIL;
diff --git a/post/memory.c b/post/memory.c
index 0dac858..a10bc50 100644
--- a/post/memory.c
+++ b/post/memory.c
@@ -224,7 +224,7 @@
 
 static int memory_post_dataline(unsigned long long * pmem)
 {
-	unsigned long long temp64;
+	unsigned long long temp64 = 0;
 	int num_patterns = sizeof(pattern)/ sizeof(pattern[0]);
 	int i;
 	unsigned int hi, lo, pathi, patlo;
@@ -418,14 +418,14 @@
 	int ret = 0;
 
 	if (ret == 0)
-		ret = memory_post_dataline ((long long *)start);
+		ret = memory_post_dataline ((unsigned long long *)start);
 	WATCHDOG_RESET ();
 	if (ret == 0)
-		ret = memory_post_addrline ((long *)start, (long *)start, size);
+		ret = memory_post_addrline ((ulong *)start, (ulong *)start, size);
 	WATCHDOG_RESET ();
 	if (ret == 0)
-		ret = memory_post_addrline ((long *)(start + size - 8),
-					    (long *)start, size);
+		ret = memory_post_addrline ((ulong *)(start + size - 8),
+					    (ulong *)start, size);
 	WATCHDOG_RESET ();
 	if (ret == 0)
 		ret = memory_post_test1 (start, size, 0x00000000);
